If distance between the largest and smallest element of arr [ ] till i - th index is equal to i
if ( Max - Min + 1 == i ) { Console . Write ( " True ▁ " ) ; } else { Console . Write ( " False ▁ " ) ; } } }