40. longestDigitsPrefix
Task Given a string, output its longest prefix which contains only digits. A substring of a string is called a prefix if it starts at the... »
Task Given a string, output its longest prefix which contains only digits. A substring of a string is called a prefix if it starts at the... »
Task You found two items in a treasure chest! The first item weighs weight1 and is worth value1, and the second item weighs weight2 and is... »
Task Caring for a plant can be hard work, but since you tend to it regularly, you have a plant that grows consistently. Each day, its... »
Task Given array of integers, find the maximal possible sum of some of its k consecutive elements. Example For inputArray = [2, 3, 5, 1, 6]... »
Task Given a string, find the number of different characters in it. Example For s = "cabca", the output should be differentSymbolsNaive(s) = 3. There are... »
Task Find the leftmost digit that occurs in a given string. Example For inputString = "var_1__Int", the output should be firstDigit(inputString) = '1'; For inputString =... »
Task Given array of integers, remove each kth element from it. Example For inputArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and... »
Task Given an array of equal-length strings, you’d like to know if it’s possible to rearrange the order of the elements in such a way that... »
Task Given a sorted array of integers a, your task is to determine which element of a is closest to all other values of a. In... »
Task You have deposited a specific amount of money into your bank account. Each year your balance increases at the same growth rate. With the assumption... »