This problem is very similar to Rumis Scorer 3. The main difference with this problem is that the board will not be completely filled in. In other words, the maximum heights designated by the stencil will not necessarily be occupied. Write a function to count the squares visible when viewed from above to determine who won each round (the stencil may or may not be helpful). See the test suite for additional examples (including test cases 1 and 2, which represent the completed boards shown below).

Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers26
Suggested Problems
-
Project Euler: Problem 2, Sum of even Fibonacci
2890 Solvers
-
Back to basics 21 - Matrix replicating
1813 Solvers
-
Permute diagonal and antidiagonal
511 Solvers
-
Circular Primes (based on Project Euler, problem 35)
655 Solvers
-
186 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!