Function to fill the position with arr [ i ] = 0
static void solve ( int [ ] arr , int n ) { HashSet < int > unfilled_indices = new HashSet < int > ( ) ; HashSet < int > missing = new HashSet < int > ( ) ;