What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-27 16:05:25
Find Number of Repetitions of Substring
using System; using System.Linq; public class Program { public static int NumberOfRepeats(string str) { int length = str.Length; int checkLength = 2; while (checkLength < length) { if (length % checkLength == 0) { var times ... Add solution -
C 2022-03-17 16:40:18
size of an array c
int a[20]; int length; length = sizeof(a) / sizeof(int); Add solution -
Java 2022-02-18 04:50:14
java copy file from one directory to another efficiently
private static void copyFileUsingStream(File source, File dest) throws IOException { InputStream is = null; OutputStream os = null; try { is = new FileInputStream(source); os = new FileOutputStream(dest); byte[] buffer... Add solution -
C# 2022-02-18 01:00:19
c# substring reverse
public static string ToReverseString(this string value) { return string.Join("", value.Reverse()); } public static string SubstringReverse(this string value, int indexFromEnd, int length) { return value.ToReverseString().Substring(indexFrom... Add solution -
Java 2022-01-26 02:10:14
Calculate area of rectangle using class in java
// calculate area of rectangle using class in java import java.io.*; class RectangleShape { int length, breadth; void setValue(int l, int b) { length = l; breadth = b; } // get area of rectangle int findArea() { ... Add solution -
Other 2022-01-25 20:05:51
how to count the most common letter in a string c
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ENG_LETTERS 26 #define STR_LEN 100 int main() { int countArray[ENG_LETTERS] = {0}; char str[STR_LEN] = { 0 }; char engChar = 'a' - 1; int length = 0; ... Add solution