Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are wrong - to sort primitives Java uses the so-called Dual-Pivot Quicksort. This algorithm is based on quicksort, as obvious from its name, but in fact, comprises many technics to ensure linear-logarithmic performance even with the massive data.
Your solution is computationally intensive as well, it performs iteration through the entire array B for every element in array A. That gives O(n * m) time complexity.
And this task can be solved in a linear time (try to refine your algorithm, or you may look at my solution).
Additionally, your code has a side effect - it mutates array B.
What language?