Shortened the scenario for brevity. I have three arrays where there is a relationship between the elements at i-th position between the three arrays.. for eg A1[0] is related to A2[0] and also A3[0] and so on … I want to sort the three arrays BASED ON THE A2 (in ascending order). so after sorting, the arrays become One thing
Tag: quicksort
(python) quicksort working for ordered data, but not for unordered data
I am working on an implementation of recursive quicksort in python. I am working with very large data sets (10,000 – 1,000,000 elements). When feeding it ordered data (i.e. changing an array sorted from largest -> smallest to smallest -> largest) it works fine. But when giving it unordered data, it doesn’t seem to work at all. I’m using a
Non-recursive Quicksort
How do i make the bottom function non-recursive, ive tried but by creating new functions which is not the point in this problem. The first function is given and the inplace_quicksort_non_recursive is created by me. What do i need to create so the bottom function becomes non-recursive Answer The question is using a variation of Hoare partition scheme (but with
Python quicksort – one list – swaps
**I need to make a quicksort algorithm but so that it uses only one list and does swaps inside of it. I managed to make it “sort” or position the first element but now i don’t know how to implement the recursion. The biggest problem I’m having is how to recursively work on a part of the list instead of