Company: Goldman sachs_27july

Difficulty: medium

Problem Statement

Unique Paths Problem Description An automated delivery drone must cross a warehouse floor laid out as a grid with m rows and n columns. The drone starts out in the top-left cell and needs to reach the bottom-right cell to finish its delivery. It can move only one cell at a time, either to the right or downward. Before committing to a route, the drone's controller wants to know exactly how many distinct routes lead from start to finish — help work that number out. Given the grid's m rows and n columns, write a program that computes how many distinct routes the drone can take from the top-left cell to the bottom-right cell. Input Format The first line of input holds an integer m, the number of rows in the warehouse grid. The second line of input holds an integer n, the number of columns in the warehouse grid. Output Format Output a single integer: the number of distinct routes the drone can take from the top-left cell to the bottom-right cell. Examples Example 1: Input: 2 3 Output: 3 Exp

More Goldman sachs_27july OA questionsInterview experiences