What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-08 06:59:08
javascript binary search
const arr = [1, 3, 5, 7, 8, 9]; const binarySearch = (arr, x , start=0, end=arr.length) => { // If the item does not exist, return -1 if(end < start) return -1; // Calculate middle index of the array let mid = Math.floor((start + end) / 2... Add solution -
Javascript 2021-10-25 03:24:15
react-native array.filter by index arrow function
_onHandleRemoveSubmittedPicture = async (i, pictureindex) => { console.log('_onHandleRemoveSubmittedPicture: Entering Function'); console.log('_onHandleRemoveSubmittedPicture: index passed in is: ', pictureindex); // // in react-native, removing an i... Add solution -
Python 2021-10-09 11:41:07
python list of tuples
#List of Tuples list_tuples = [('Nagendra',18),('Nitesh',28),('Sathya',29)] #To print the list of tuples using for loop you can print by unpacking them for name,age in list_tuples: print(name,age) #To print with enumerate--->enumerate is nothing b... 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