- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Suppose we have two numbers n and m representing a board of size n x m. We also have an unlimited number of 1 x 2 dominos. We have to find the maximum number of dominos that can be placed on the board such that they don't overlap and every domino lies completely within the board.

So, if the input is like n = 5, m = 3, then the output will be 7

To solve this, we will follow these steps −

- t := n * m
- return quotient of (t / 2)

Let us see the following implementation to get better understanding −

class Solution: def solve(self, n, m): t = n * m return t // 2 ob = Solution() print(ob.solve(5,3))

5,3

7

- Related Questions & Answers
- Number of Equivalent Domino Pairs in Python
- Vertex Covering
- Line/Edge Covering
- Domino and Tromino Tiling in C++
- Minimum Cost to cut a board into squares in Python
- Battleships in a Board in C++
- Add a new board in Arduino
- Change board selection in Arduino IDE
- Components of Arduino Uno board
- Printed Circuit Board (PCB) Motors
- Smallest Range Covering Elements from K Lists in C++
- Finding the line covering number of a graph
- Python program to print check board pattern of n*n using numpy
- Program to find next board position after sliding the given direction once in Python
- Program to check words can be found in matrix character board or not in Python

Advertisements