Thanks a lot brother, please continue making video like this .. where you also tell the thinking process of yours used during contest.
@codeExplainer2 жыл бұрын
Sure I will
@saket19203 жыл бұрын
Bro , your code won't work if the minimum element will occur at the last index. Because then , your ind will be 'n-1' and in your first loop , you're iterating from i+1 so , your i will become 'n' but a[n] doesn't exist.
@vishalsiddha66373 жыл бұрын
Brother what if min element are at 1 st position then how will you proceed ?? You took middle 3 instead of 1st one how you did that?
@codeExplainer3 жыл бұрын
it does'nt matter , we just want to make the number left and right side in a increasing way , if the minimum if first then we would make the right side in increasing order.
@vishalsiddha66373 жыл бұрын
@@codeExplainer thanks
@vishalsiddha66373 жыл бұрын
One more question,according to your approach it would always takes O(n) even if we only need one operation for making array a good array i am right??
@sahilanand302 жыл бұрын
Nice explanation
@codeExplainer2 жыл бұрын
Thanks for liking. keep learning and keep coding.
@flanker533 жыл бұрын
why are english on these are difficult to understand