geeksforgeeks
  • Courses
  • Tutorials
  • Practice
  • Jobs
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
Videos
June 28, 2022 |1.4K Views

Tiling Problem (Explanation)

Dynamic Programming, dynamic-programming, fibonacci
 Save  Share   Like
Description
Discussion

Given a “2 x n” board and tiles of size “2 x 1”, count the number of ways to tile the given board using the 2 x 1 tiles. A tile can either be placed horizontally i.e., as a 1 x 2 tile or vertically i.e., as 2 x 1 tile.

Examples:

Input: n = 4

Output: 5

Explanation:

For a 2 x 4 board, there are 5 ways

All 4 vertical (1 way)
All 4 horizontal (1 way)
2 vertical and 2 horizontal (3 ways)

Tiling Problem (Explanation) : https://www.geeksforgeeks.org/tiling-problem/

Recommendations
Video Thumbnail
11:22
Video Thumbnail
370.1K Views | 10/01/2025...
Knapsack Problem - Approach to write the code (Dynamic Programming)
Video Thumbnail
12:42
Video Thumbnail
39.8K Views | 09/01/2025...
Program for Nth Catalan Number (using Binomial Coefficient)
Video Thumbnail
13:36
Video Thumbnail
46.7K Views | 22/08/2024...
Find maximum possible stolen value - House Robber Problem
Video Thumbnail
15:27
Video Thumbnail
20.9K Views | 31/07/2024...
Box Stacking Problem
Video Thumbnail
25:07
Video Thumbnail
460 Views | 31/07/2024...
Dynamic Programming | Set 11 (Egg Dropping Puzzle)
Video Thumbnail
04:03
Video Thumbnail
890 Views | 16/04/2024...
Count ways to reach the nth stair using step 1, 2 or 3
Video Thumbnail
00:32
Video Thumbnail
1.0K Views | 05/04/2024...
Introduction to Dynamic Programming using C/CPP
Video Thumbnail
15:15
Video Thumbnail
12.2K Views | 21/07/2022...
Check if a word exists in a grid or not
Video Thumbnail
03:57
Video Thumbnail
7.9K Views | 07/07/2022...
Detect if two integers have opposite signs (Dynamic Programming)
Video Thumbnail
06:08
Video Thumbnail
980 Views | 04/07/2022...
Longest palindrome subsequence with O(n) space
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Careers
  • Contact Us
  • Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Practice Problems
  • Connect
  • Blogs
  • Upskill Courses
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • GATE
  • School Subjects
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Data Science
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • MongoDB Certifications
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved