We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Sorting
- Big Sorting
- Discussions
Big Sorting
Big Sorting
Sort by
recency
|
952 Discussions
|
Please Login in order to post a comment
Here is problem solution in python java c++ c and Javascript - https://programmingoneonone.com/hackerrank-big-sorting-problem-solution.html
Can someone help me understand why my program, written in JavaScript programming language, failed some test cases in solving bigSort challenge?
First of all (or scenario 1), I solved the "bigSort challenge" with application of bubble sort algorithms:
function bigSort(unsorted) { const size = unsorted.length;
To my surprise, this fails test: test case 2, test case 7 and some others.
Secondly (or scenario 2), I modified the code with the language in built "sort()" method. I provided it with the callback compare function as follows:
Folks, kindly help me understand why some test cases failed, specifically test case 2 and 7 in the two scenarios.
Here is my c++ solution, you can watch the explanation here : https://youtu.be/GAvltofMdYc
def bigSorting(unsorted): # Write your code here