one test case is failing, there was a line “print all values in returned array” and i am only returned a particular value . may be if this test case is failing,pls tell
All Indices Problem
yes u judge it right
if array is
1 2 4 8 2 5 4 6 2 3
and u have to fid 2 then u et first and last nnot middle one
1 Like
@phantom what changes do i need to make then? for the problem you have assigned above my code is working fine.
Make a global array and whenever u find the number put it’s index in the array and just in the main cout all elements of the array