Function to print the valid indices in the array
void printAns ( int x , int y , int num ) { cout << " Indices ▁ in ▁ array ▁ " << num << " ▁ : ▁ " ; for ( int i = x ; i < y ; ++ i ) { cout << i << " , ▁ " ; } cout << y << " STRNEWLINE " ; }