retagged by
492 views
0 votes
0 votes

Answer given is Option A , but here we wil first sort the jobs in order of profit , for each value of deadline scan linearly in the array depending on the value of deadline , so it should take O(n^2) in worst case .

retagged by

Please log in or register to answer this question.

Related questions

4 votes
4 votes
3 answers
1
val_pro20 asked May 15, 2019
1,218 views
What is the time complexity for checking whether an assignment of truth values to variables $x_1,\dots ,x_n$ satisfies a given formula $f(x_1\dots,x_n)$?$O(2^n)$$O(g(n))$...
3 votes
3 votes
2 answers
4
Purple asked Feb 7, 2017
913 views
How many ways are there for arranging letters of the word AMAZING such that the 'I' appears between the two 'A's?(A) 5! ways(B) 7! ways(C) 8! ways(D) 4! waysNote: AMZIA i...