← Microsoft questions

Count possible paths from top-left to bottom-right in an N x M matrix

Filed under Microsoft

Given two integers N and M representing the dimensions of an N x M grid, return the total number of unique paths from the top-left corner (0, 0) to the bottom-right corner (N-1, M-1). You can only…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.