Dsa
Dynamic Programming
Easy
Tile Patterns
You have a 2xN board and you want to fill it with 2x1 dominoes. Given `n`, calculate the number of distinct ways to tile the board. Implement a function that takes `n` as input and returns the number of ways to fill the board. The input is a single integer n. Output the number of distinct ways.
Example:
Input:
3
Output:
3
Key concepts
dynamic_programmingcombinatorial
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now