Tag «Array»

Array Bubble Sort in Java

Although Java’s Arrays class has a built-in method to sort an array, it is important for good Java developers to know how to sort an array on their own. Bubble sort is the simplest sorting algorithm.

Sort numbers in Javascript array

Sorting an array in Javascript is a snap. You create an array and then call sort() method on that array. The Javascript sort() method sorts an array in lexicographical order. This method is very useful in sorting alphanumeric values of an array. However, sort() will not work if the array consists of numeric values. Because …