Redirecting to
NADOS
- Fibonacci-dp
- Fibonacci-dp
- Climb Stairs
- Climb Stairs
- Climb Stairs With Variable Jumps
- Climb Stairs With Variable Jumps
- Climb Stairs With Minimum Moves
- Climb Stairs With Minimum Moves
- Min cost In Maze Traversal
- Min Cost In Maze Traversal
- Goldmine
- Goldmine
- Target Sum Subsets - DP
- Target Sum Subsets - Dp
- Coin Change Combinations
- Coin Change Combination
- Coin Change Permutations
- Coin Change Permutations
- Zero One Knapsack
- Zero One Knapsack
- Unbounded Knapsack
- Unbounded Knapsack
- Fractional Knapsack - Official
- Count Binary Strings
- Count Binary Strings
- Arrange Buildings
- Arrange Buildings
- Count Encodings
- Count Encodings
- Count A+B+C subsequences
- Count A+b+c+ Subsequences
- Maximum Sum Non Adjacent Elements
- Maximum Sum Non Adjacent Elements
- Paint House
- Paint House
- Paint House-Many colors
- Paint House - Many Colors
- Paint Fence
- Paint Fence
- Tiling with 2*1 Tiles
- Tiling With 2 * 1 Tiles
- Tiling with M*1 Tiles
- Tiling With M * 1 Tiles
- Friends Pairing
- Friends Pairing
- Partition Into Subsets
- Partition Into Subsets
- Buy And Sell Stocks - 1 Transaction Allowed
- Buy And Sell Stocks - One Transaction Allowed
- Buy and sell Stocks - Infinite Transaction Allowed
- Buy And Sell Stocks - Infinite Transactions Allowed
- Buy & Sell Stocks With Transaction Fee - Infinite Transactions Allowed
- Buy And Sell Stocks With Transaction Fee - Infinite Transactions Allowed
- Buy & Sell Stock - Cooldown
- Buy And Sell Stocks With Cooldown - Infinite Transaction Allowed
- Buy and Sell Stocks- Two Transactions Allowed
- Buy And Sell Stocks - Two Transactions Allowed
- Buy and Sell Stocks- K Transactions Allowed
- Buy And Sell Stocks - K Transactions Allowed
Fibonacci-dp
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.1. You are given a number n.Input Format
2. You are required to print the nth element of fibonnaci sequence.
Note -> Notice precisely how we have defined the fibonnaci sequence
0th element -> 0
1st element -> 1
2nd element -> 1
3rd element -> 2
4th element -> 3
5th element -> 5
6th element -> 8
A number nOutput Format
A number representing the nth element of fibonnaci sequenceQuestion Video Constraints
0 <= n <= 45Sample Input
10Sample Output
55
-
Asked in Companies
-
Related Topics
Your profile is incomplete!
Please click here to complete your profile to continue submitting questions.
Video Solution
Code Solution
{ }
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
- fold Alt-L|Ctrl-F1
- unfold Alt-Shift-L|Ctrl-Shift-F1
- Gotoend Ctrl-End
- Gotostart Ctrl-Home
- Movelinesup Alt-Up
- Movelinesdown Alt-Down
- Undo Ctrl-Z
- Redo Ctrl-Shift-Z|Ctrl-Y
- Replace Ctrl-H
- Togglecomment Ctrl-/
- ToggleBlockComment Ctrl-Shift-/
- Removeline Ctrl-D
{ }
Run
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
- fold Alt-L|Ctrl-F1
- unfold Alt-Shift-L|Ctrl-Shift-F1
- Gotoend Ctrl-End
- Gotostart Ctrl-Home
- Movelinesup Alt-Up
- Movelinesdown Alt-Down
- Undo Ctrl-Z
- Redo Ctrl-Shift-Z|Ctrl-Y
- Replace Ctrl-H
- Togglecomment Ctrl-/
- ToggleBlockComment Ctrl-Shift-/
- Removeline Ctrl-D