Suppose that the city of Sochi can be described as a 2D matrix. Each cell may or may not contain a flower. You are given the list of cells that contain flowers. In a single basket, a gardener can pick...


Suppose that the city of Sochi can be described as a 2D matrix. Each cell may or may not contain a<br>flower. You are given the list of cells that contain flowers. In a single basket, a gardener can pick all<br>the flowers standing in a row or in a column. But using picking flowers using basket drains gardener's<br>power. Develop a python code to print the minimum number of baskets that will be required to pick<br>all the flowers.<br>Test Case:<br>1<br>3<br>00<br>10<br>01<br>Result:<br>2<br>

Extracted text: Suppose that the city of Sochi can be described as a 2D matrix. Each cell may or may not contain a flower. You are given the list of cells that contain flowers. In a single basket, a gardener can pick all the flowers standing in a row or in a column. But using picking flowers using basket drains gardener's power. Develop a python code to print the minimum number of baskets that will be required to pick all the flowers. Test Case: 1 3 00 10 01 Result: 2

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here