How do I demonstrate the following algorithm has O(nlogn) time complexity

Published: 21/10/2019
How do I demonstrate the following algorithm has O(nlogn) time complexity
Source: STACKOVERFLOW.COM

It's an algorithm that finds the mininum number of descending rows and the rows themselves of an array in O(nlogn) time complexity . Another part of the exercise is to use these descending rows to implement Patience Sort, which also has to be O(nlogn) (that is from the c = 1 part). What I don't get is where the logn part comes from in both cases. #include <iostream> #include <fstream>

Read more
Related news
Comment
FACEBOOK