We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
time complexity for my code is N*lg(N) there are T number of test cases, So overall running time for one input set should be T*N*lg(N). In worst case it will be (10^5)(10^5)(lg(10^5)) > 10^10 but my code still running fine can somebody please explain it.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Mandragora Forest
You are viewing a single comment's thread. Return to all comments →
time complexity for my code is N*lg(N) there are T number of test cases, So overall running time for one input set should be T*N*lg(N). In worst case it will be (10^5)(10^5)(lg(10^5)) > 10^10 but my code still running fine can somebody please explain it.