Grew up in Russia, lived in the States, moved to Germany, sometimes live in Spain. I program since I was 13. I used to program games, maps and now I reverse engineer password managers and other stuff
Location
Berlin and Málaga
Education
MS in CS from State Polytechnic University of St. Petersburg
Yes, it's a quicksort, in theory. But it won't be quick since it's not in-place. If you're not using the in-place version you're better off with the merge sort most likely. It's stable and it's guaranteed to be O(N*logN). Quicksort is O(N*N) in the worst case. In your version this would happen if you pass in a sorted array.
I'm a full stack web engineer with a strong front-end focus. I'm passionate about making the user's experience on the web more accessible, faster, and easier to use.
Yes, it's a quicksort, in theory. But it won't be quick since it's not in-place. If you're not using the in-place version you're better off with the merge sort most likely. It's stable and it's guaranteed to be O(N*logN). Quicksort is O(N*N) in the worst case. In your version this would happen if you pass in a sorted array.
Thanks Dmitry for pointing that out! Next up, in-place sort!