Загрузка...

StairCase - Recursion Approach

This video attempts to explain how to solve the staircase questions using a recursive approach. This is PART 2 of the StairCase Algorithm.
Question.
There exists a staircase with N steps, and you can climb up either 1 or 2 steps at a time. Given N, write a function that returns the number of unique ways you can climb the staircase. The order of the steps matters.
For example, if N is 4, then we have 5 unique ways
i.e. 1, 1, 1, 1 and 2, 1, 1 and 1, 2, 1 and 1, 1, 2 and 2, 2
If you found it educative do subscribe, like and share.

Видео StairCase - Recursion Approach канала esSolutions
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять