What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-13 12:05:21
strictly increasing or strictly decreasing javascript
function is_monotonous(num) { if (num.length === 1) { return true; } const num_direction = num[1] - num[0]; for (let i = 0; i < num.length - 1; i++) { if (num_direction * (num[i + 1] - num[i]) <= 0) { retu... Add solution -
C# 2021-10-11 13:37:05
random number generator without duplicates c#
using System.Linq; public int range; public int MyNum[]; public int KnownNumbers[]; public int UniqueNumbers; private void MyNumbers() { MyNum = new int[range]; for (int i = 0; i < range; i++) { MyNum[i] = i; } } private ... Add solution -
Java 2021-09-21 00:27:03
number to words java
class NumberToWordExample1 { //user-defined static method that converts a number into words static void numberToWords(char num[]) { //determines the number of digits in the given number int len = num.length; //checks the given number has nu... Add solution -
Java 2021-09-04 00:51:02
leetcode 46 problem permutation in java
public ArrayList<ArrayList<Integer>> permute(int[] num) { ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>(); //start from an empty list result.add(new ArrayList<Integer>()); &nbs... Add solution -
Javascript 2021-08-29 21:37:02
Sum All Primes
// I will update this code later, cause this is already very tasky, // bad performance(Two loops inside a loop) // Very bad, but it works const sumPrimes = num => { const divisor = [] for(let i = 2; i <= num; i++){ let factorial = [], j = ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5