378 Kth Smallest Element in a Sorted Matrix
668 Kth Smallest Number in Multiplication Table
719 Find K-th Smallest Pair Distance
786 K-th Smallest Prime Fraction
980. Unique Paths III
backtracking, depth-first-search
to save space, in place replace grid[i][j] from 0 to -2,
after finishing the search in this branch, change it back to 0