Driver code
let range = [ [ 1 , 2 , 3 ] , [ 2 , 5 , 1 ] , [ 3 , 10 , 1 ] , [ 4 , 4 , 1 ] , [ 5 , 7 , 10 ] ] let n = range . length ; if ( isPossible ( range , n ) ) document . write ( " " ) ; else document . write ( " " ) ;