change below example
int [ ] arr = { 1 , 2 , 5 , 3 , 4 } ; int N = arr . Length ; int res = minSwapToReachArr ( arr , N ) ; if ( res == - 1 ) Console . WriteLine ( " Not ▁ Possible " ) ; else Console . WriteLine ( res ) ; } }