Implement stack with max,push and pop Given unsorted array, find pair with a given sum , O(n) Complexity Puzzle - 7g gold to be distributed in 7 days with min cuts. Asked to Generalize 100 bottles , 1 poisonous. How to determine in O(1)
Anonymous
7g gold to be distributed in 7 days with min cuts: you need to make minum two curt : 1gm and 2gm last will automatically calculate to 4 gm. 1 day - GIve 1gm, you will have 2gm and 4gm in ur hand. 2- day Give 2gm and take 1 gm back, you will have 1gm and 4gm in ur hand. 3- day- give 1 gm , you will have 4gm in ur hand. 4-day - give 4gm, and take back 1 and 2 gm, you will have 2gm and 1gm in ur hand. 5 day - give 1gm, you will have 2gm in ur hand. 6-day - give 2gm and take back 1 gm 7-day give last 1gm Enjoy!!
Check out your Company Bowl for anonymous work chats.