This works for m*n grid also

In nqueen question mam replaced row with row+1 and col with 0 and told that it is for nn grid only. But this works in mn grid also i.e. the queen2Dkill question. I have tested the code and results in both cases were same. I just want to confirm that am I right in my thinking or am I missing something?

@abhinavsehgal802_270a44594b6dc4ad You are correct bro. It is just a method to reduce the number of calls so that will work for both mXn as well as n*n grid because we can not place a queen in the same row whether it is a square board or rectangle.