Hii I wrote this and it would be of great help if you could tell me what is wrong with my approach I https://ide.codingblocks.com/s/596809
Again the same issue . Kindly specify what is wrong with my code rather than giving your own solution
for input
5 4 3 2 1 -1
5
Your Code Output: 4
Correct Output: 5
just make one change
at line no 26 Correct statement is:
while(fast and k–){
Modified Code
Hii so even with k-- and fast it says the 1st test case failed
is this code not passing test case??
No for the first test case it says failed