1 1 vote Data Structures + – Niharika 1 680 views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Anu007 commented Jan 20, 2018 reply Follow flag Searching on linked list take O(n) Try with 1st repository : 1024 -> O(10 msec) but needed to be O(1024) = 1024 approx only 1024 = k O(10 msec) k = 102.4 i.e. comes after 1024/ 10 = 102.4 same for 1048576 -> O(10240 ms)but needed to be 1048576 only 1048576 = k (10240 ms) Multiplication factor k= 102. 4 something ... Now try fo second repository : Searching on sorted array take O(logn) 1024 -> O(400 msec) but needed to be log(1024) = aprrox 10 only 1024 = k O(10 msec) Division factor k = 40 Same for 1048576 -> O(800 ms) but it needed to be 20 only 1048576 = k (20 ms) k= 40 something ... Now try each and every option with same k value for respective repository 65356 /102.4 = 550 approx equal to log(65356)*40 = 640 0 0 replyShare srestha commented Jan 20, 2018 reply Follow flag @Anu for 1st one O(kn) why r u dividing?? 65356 /102.4 it will be 65356 *102.4 right?? 0 0 replyShare gauravkc commented Jan 20, 2018 reply Follow flag Time is a function of input, right? Why is 1024 = k O(10ms) ? 0 0 replyShare Please log in or register to add a comment.