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
Arrange Buildings
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, which represents the length of a road. The road has n plots on it's each side.Input Format
2. The road is to be so planned that there should not be consecutive buildings on either side of the road.
3. You are required to find and print the number of ways in which the buildings can be built on both side of roads.
A number nOutput Format
A number representing the number of ways in which the buildings can be built on both side of roads.Question Video Constraints
0 < n <= 45Sample Input
6Sample Output
441
-
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