Tag: sorting
Given an array of numbers arr. A sequence of numbers is called an arithmetic progression if the difference between any two consecutive elements is the same. Return true if …
The selection sort, similar to insertion sort, is one of the simple sorting algorithm that has O(N^2) time complexity. The selection sorting algorithm is quadratic, thus not efficient when …
Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths. If it is impossible to form …
Given an array of non-negative integers, re-arrange the numbers so that the even numbers come before the odd numbers. You may return any answer that satisfy the condition. If …
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 …