Algorithms ;)
HackerRank Solutions
- As soon as . . .
LeetCode Solutions
- As soon as . . .
SelfLearning Solutions
-
1.) SumFuntion
- Type a function called sum. An array of function numbers i parameter and return the sum of all elements of the array Click for Solution ;)
-
2.) RandomNumber
- Type a function called random. The function must take two parameters, lower and upper, and return an arbitrary natural number between those two numbers (including both) Click for Solution ;)
-
3.) ArithmeticMean
- Type a function called arithmeticMean. Your function is an array of numbers i should be taken as a parameter and the numerical mean of the elements of the array must return Click for Solution ;)
-
4.) GeometricMean
- Type a function called geometricMean. Your function is an array of numbers i should be taken as a parameter and the geometric mean of the elements of the array must return Click for Solution ;)
-
5.) EuclideanDistance
- Type a function called euclideanDistance. The function takes two vectors as parameters should and they should return the Euclidean distance. When we say vector We are talking about an array of two additional elements. The first element of the array is x the second element y i denotes: [x, y]. Click for Solution ;)
-
6.) PickOne
- Type a function called pickOne. The function must accept an array of numbers and from within must return an arbitrary elements Click for Solution ;)
-
7.) Includes
- Type a function called includes. Function to search for one array and one number must accept value. If that value exists within the array, true otherwise it must return false Click for Solution ;)
-
8.) Unique
- Type a function called unique. The function must return an array of parameters to a new array that does not contain repeating elements Click for Solution ;)
-
9.) InterSection
- Write a function called intersection. The function should take two arrays as a parameter and return their intersection as a new array Click for Solution ;)
-
10.) Flat2D
- Type a function called flat2D. The function must take one two-dimensional array i as a parameter and return a new one-dimensional array Click for Solution ;)
-
11.) Union
- Type a function called union. The function should take two arrays i as a parameter and must return their combination as a new array Click for Solution ;)
-
12.) Reverse
- Type a function called reverse. The function must take an array i as a parameter and must return its inverse as a new array Click for Solution ;)
-
13.) Map
- Type a function called map. The function is an array i and a function should be taken as a parameter, the result of the function to each element of the array must apply and return a new array Click for Solution ;)
-
14.) Filter
- Type a function called filter. The function must take an array i and a function as parameters and return a new array. The given recall function must check each element of the array and access all the elements it returns to the new array. Click for Solution ;)
-
15.) Find
- Type a function called find. The function must accept an array i and a function as a parameter. The given callback function must check each element of the array and answer the first element find function that returns true Click for Solution ;)
-
16.) Some
- Type a function called some. The function must take an array i and a function as parameters and return a Boolean value. The given callback function must check each element of the array, and if at least one element returns such a true result, the answer of some function must be true. In all other cases, some function must return false Click for Solution ;)
-
17.) Every
- Type a function called every. The function must take an array i and a function as parameters and return a Boolean value. The given callback function must check each element of the array, and if all elements are true, the result of every function must be true. In all other cases, the function must return false Click for Solution ;)
-
18.) Reduce
- Write a function called reduce. The function must take one array and one callback function as parameters and return a new value. Read the reduction function documentation to learn how the reduce function works. Click for Solution ;)
-
19.) GeneratePassword
- Type a function called generatePassword. The function must take a parameter called passwordLength and generate a password of that length. The password must consist of numbers, uppercase and lowercase English letters Click for Solution ;)
-
20.) CeaserCipher
- Type a function called ceasarCipher. The function must accept a string i and a key number as parameters. Assuming that the given string is a sentence consisting of English letters, encrypt it with Caesar code and return the result as another string Click for Solution ;)