this code is just showing error … its working on the ide …cant figure out the poblem
Unlock code showing unknown error
i made some changes in the code… please check it.
note: you can still optimize the code… you are finding max element every time with linear complexity… think about a data structure that can give you next max element in an efficient way…
thanks