this is not the 34th problem, This is the easy one. In actual, the question asks for Minimum no. of operations required to make an array palindrome. Its not asking whether the array is palindrome or not :D
@mahipalsingh-yo4jt4 жыл бұрын
the que should be no of merge operations to make array palindrome. This easy cannot be included in the list
@pawankumarpandit1822 Жыл бұрын
what a amazing solution bhaiya
@prashujain48442 жыл бұрын
thanks you teach amazing bro ! keep it up. 😍
@chetan40133 жыл бұрын
First video and subscribed
@VISHALSHARMA-mu9kl3 жыл бұрын
Nice Vedio 🔥🔥🔥🔥🔥🔥🔥🔥
@pramitigupta23993 жыл бұрын
i wrote the same code but instead of != and returning 0, i used == and returned 1. why is my code showing 1 as output for both the arrays.
@anjalikumari1299 ай бұрын
Same problem
@yashodraj29792 жыл бұрын
your code is wrong ! As the for loop iterates everytime the ans value is reset to 0 and everytime ans*10 value is zero so it's just printing the reminder value which is same as the array value so for every input it will just print true / 1 So Please post the correct code which has logic instead of just printing output value.
@CodeLibrary2 жыл бұрын
I guess you have not understood the problem properly, basically ans is updated everything inside while loop. And we are reseting to 0 for each iteration of for Loop, because we have to check for every element of the array. As ans is becoming 0 for each for Loop iteration so in first iteration of while loop we will get the reminder and in remaining iteration of while loop you will get some values... Think once again ✌️