Rearrange an array in Max & Min Form | DSA | Programming Tutorials | GeeksforGeeks

preview_player
Показать описание
Our courses :

This video is contributed by Rahul Singla

Please Like, Comment, and Share the Video among your friends.

Install our Android App:

If you wish, translate into the local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

Not an useful explanation. Questions is on what background you had derived this formula. There must be a base question for this. We are interested in logic not the solution.

speedbreaker
Автор

But the question remains, how do you come up with formula? Or what's the logic behind this formula?

VanBhardwaj
Автор

Rahul bhaiya ye toh jaadu ho gya... I'm stunned 👍

satyamsrivastava.
Автор

do we have to assume the max element as 10 for all the cases or we have to calculate the max element on the basis of our max element in the array +1???

ujjwalkumar
Автор

Are we assuming that we have been provided a sorted array ?

aniket
Автор

Sir can you provide the code and make us understand that also???

manukumar
Автор

there is no use of such formula, we could directly maintain variable for keeping the values from ith index, and apply the same two pointer method !

saarthjhaveri