NPTEL Programming, Data Structures And Algorithms Using Python Week 8 Programming Assignment | NPTEL Swayam Assignment Answers
Join Us On Telegram
👇👇👇👇👇👇👇
Nptel Week 8 Programming Assignment Answers:
Q.1: For this assignment, you have to write a complete Python program
Domino Solitaire
(Indian National Olympiad in Informatics, 2008)
In Domino Solitaire, you have a grid with two rows and many columns. Each square in the grid contains an integer. You are given a supply of rectangular 2 × 1 tiles, each of which exactly covers two adjacent squares of the grid. You have to place tiles to cover all the squares in the grid such that each tile covers two squares and no pair of tiles overlap.
The score for a tile is the difference between the bigger and the smaller number that are covered by the tile. The aim of the game is to maximize the sum of the scores of all the tiles.
Here is an example of a grid, along with two different tilings and their scores.
If you are facing any queries regarding this assignment solutions, then please drop comment in comment section.
0 Comments