Thanks for mentioning, wanted to say it happens in log(n) as in BST.
@ris_colid325 Жыл бұрын
I would like to mention ,that while explaining you said that we are only taking the diagonally adjacent elements like in this example you said that only 4+6 , 4+5 and 6+3 are made and not 6+2 or further distant elements. This is probably a mistake since if we took more elements in the answer while explaining we find that farther elements give a greater sum . 6+2 > 3+2 or 5+2 ,even though 6+ 2 are not diagonally adjacent and (5,2) (3,2) are diagonally adjacent. If you see carefully ,even the code you mentioned is not only putting diagonally adjacent elements but is taking combinations that are not diagonally adjacent as well since one of the array indexes is incremented while insertion without the limitation of it being diagonally adjacent to index of other array.. It is more correct to say that we pick diagonally less distant elements ,starting from the pair of maximum elements ,instead of diagonally adjacent.
@ShubhamKumar-ho9pz Жыл бұрын
you should change your occupation
@akworld27398 ай бұрын
🤣🤣
@siddharthkhandelwal9335 ай бұрын
True
@alisheheryar177027 күн бұрын
@GeeksforGeeksPractice Жыл бұрын
Solution Function Link: ide.geeksforgeeks.org/online-python3-compiler/0f43cb17-1fbf-4287-bbe5-9b620d44482b
@vikashpatel43115 ай бұрын
worst tutor ever...........😒
@amanmittal-x6kАй бұрын
bhai padhana band karde. tere se bekar tutor ho hi nhi sakta. kisne diya tere ko GFG me job.
@alisheheryar177027 күн бұрын
Spend more time on dry run. We ain't here for OOP lessons.