Better Experience Download iQuanta App

Google PlayApp Store
Learner
26d
#Doubt Responded
Can someone help with this

Comments2

Prashant

Prashant

Think of the grid as having 5 vertical lines (Columns 1 to 5) and 5 horizontal lines (Rows 1 to 5). • Row 1 (Top): Point A is here. • Paths: 1, 1, 1, 1, 1 (Only one way to go straight right). • Row 2: • First box under A is missing. So start at Column 2. • Paths: (blank), 1 (only down from top), 2 (1+1), 3 (2+1), 4 (3+1). • Row 3: • First two boxes are missing. Start at Column 3. • Paths: (blank), (blank), 2 (down from 2 above), 5 (2+3), 9 (5+4). • Row 4: • First three boxes missing. Start at Column 4. • Paths: (blank), (blank), (blank), 5 (down from 5 above), 14 (5+9). • Row 5 (Bottom): Point B is at the bottom right. • From 14, go down to the last corner: 14. • Move right to Point B: 14 + 14 = 28. Answer: 28 distinct paths.

Superman - iQuanta

Superman - iQuanta

It's a staircase grid, not a full rectangle, so the leftmost node of each row has no valid left-neighbour. Fill paths row by row (only right and down, valid nodes only): Row 0: 1, 1, 1, 1, 1 Row 1: (starts col 1) 1, 2, 3, 4 Row 2: (starts col 2) 2, 5, 9 Row 3: (starts col 3) 5, 14 Row 4: (starts col 4) 14 This is the 4th Catalan number, which is what staircase grids of this type always give. 14

Log in to join the discussion.