Retired
Coin Flipper (retired)
Description:
You're given an M * N matrix of coins, some flipped to heads, some tails. And you want to make it so they are all heads. For example:
H T H
T H H
T H T
You have one available operation: flip(row,column). This function flips every coin from index [0,0] to [row,column] inclusive and returns the resulting matrix. So if flip(1,1) were applied to the matrix above, the result would be:
T H H
H T H
T H T
The target for this example would be:
H H H
H H H
H H H
Coin values are stored as booleans, for simplicity.
Your function shouldn't return anything. It's not necessary to minimize the number of flips. Again, remember flip returns the new matrix.
Fundamentals
Similar Kata:
Stats:
Created | Dec 6, 2016 |
Warriors Trained | 32 |
Total Skips | 0 |
Total Code Submissions | 52 |
Total Times Completed | 9 |
Python Completions | 9 |
Total Stars | 2 |
% of votes with a positive feedback rating | 13% of 4 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 2 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |