`{"id":"33bce77d-2a42-4f91-a5ab-565a56b04380","name":"Floor Tiling - 2","description":"1. You are given a number N.\r\n2. You have two types of tiles: a 2x1 domino shape, and an \"L\" tromino shape. \r\n3. You have to find the number of ways to tile a 2*N dimensional floor.\r\n\r\nNote -> You can also rotate the tiles.","inputFormat":"A number N","outputFormat":"Print your answer modulo 10^9+7.","constraints":"1 &lt;= N &lt;= 1000","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static int solution(int N) {\r\n\t\t//write your code here\r\n\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint n = scn.nextInt();\r\n\t\tSystem.out.println(solution(n));\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3","sampleOutput":"5\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"4a55a33b-92dc-4886-adc6-5aec5c429e68","name":"Floor Tiling - 2","slug":"floor-tiling-2","type":1}],"next":{"id":"aa8da00b-d6fa-44f5-b9d6-a7abd343efb1","name":"FLOOR TILING-2 MCQ","type":0,"slug":"floor-tiling-2-mcq"},"prev":{"id":"0845c358-1efd-4102-89f5-8386d6c504be","name":"Egg Drop","type":3,"slug":"egg-drop"}}}`

# Floor Tiling - 2

1. You are given a number N. 2. You have two types of tiles: a 2x1 domino shape, and an "L" tromino shape. 3. You have to find the number of ways to tile a 2*N dimensional floor. Note -> You can also rotate the tiles.

`{"id":"33bce77d-2a42-4f91-a5ab-565a56b04380","name":"Floor Tiling - 2","description":"1. You are given a number N.\r\n2. You have two types of tiles: a 2x1 domino shape, and an \"L\" tromino shape. \r\n3. You have to find the number of ways to tile a 2*N dimensional floor.\r\n\r\nNote -> You can also rotate the tiles.","inputFormat":"A number N","outputFormat":"Print your answer modulo 10^9+7.","constraints":"1 &lt;= N &lt;= 1000","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static int solution(int N) {\r\n\t\t//write your code here\r\n\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint n = scn.nextInt();\r\n\t\tSystem.out.println(solution(n));\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3","sampleOutput":"5\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"4a55a33b-92dc-4886-adc6-5aec5c429e68","name":"Floor Tiling - 2","slug":"floor-tiling-2","type":1}],"next":{"id":"aa8da00b-d6fa-44f5-b9d6-a7abd343efb1","name":"FLOOR TILING-2 MCQ","type":0,"slug":"floor-tiling-2-mcq"},"prev":{"id":"0845c358-1efd-4102-89f5-8386d6c504be","name":"Egg Drop","type":3,"slug":"egg-drop"}}}`

Editor

# Floor Tiling - 2

medium

1. You are given a number N. 2. You have two types of tiles: a 2x1 domino shape, and an "L" tromino shape. 3. You have to find the number of ways to tile a 2*N dimensional floor. Note -> You can also rotate the tiles.

1 <= N <= 1000

A number N

## Example

Sample Input

`.css-23h8hz{color:inherit;font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;}3`

### Sample Output

```.css-3oaykw{color:var(--chakra-colors-active-primary);font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;font-family:Monospace;}5 ```

Discussions

Show Discussion

Related Resources