Tag: numbers
Given an integer n (in base 10) and a base k, return the sum of the digits of n after converting n from base 10 to base k. After …
Given a string s representing a number in base 3 (consisting only of 0, 1, or 2), return its decimal integer equivalent. Example 1 Input s = “10” Output …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a positive integer num, return the sum of its digits. Bonus: Can you do it without using strings? Constraints …
An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers …
May 7, 2014
algorithms, code, code library, data structure, implementation, programming languages, sorting, VBA, vbscript, windows, windows scripting host
Among the simple sorting algorithms, the insertion sorting algorithm is my favourite. Insertion sort is simple to implement and gives an average quadratic O(n2) running time, like other simple …