Is it possible to change my recursive method to iterative?
问题 I'm writing a quicksort algorithm to sort numbers with random pivot. How can I change my quicksort methods from recursive to iterative? I have one sort method which is recursive, but I need the iterative method. Is it possible to change from recursive to iterative in just the sort method or do I have to change the whole code? here is all my code public class Main { public static void main(String[] args) { long start = System.currentTimeMillis(); ArrayList time = new ArrayList(); for (int k =