Please check the code for finding all indices in array of elements

hello @dkroy8790
0 can be a valid value in out array,so u cannot stop interation just by seeing 0 in out array.

initilaise out array with -1,run ur algorithm,while printing out array stop iteration when -1 is encounter.