So I was going through different sorting algorithms. But almost all the sorting algorithms require 2 loops to sort the array. The time complexity of Bubble sort & Insert
javascript: function bruteForce(arr){ for(var i=0;i
Copy the code and paste in URL of the browser and hit enter. If the javascript: is missed then add it.
javascript: