7 kyu
Yoga Class
604 of 664ok-john
Description:
Description
Lets imagine a yoga classroom as a Square 2D Array of Integers classroom
, with each integer representing a person, and the value representing their skill level.
classroom = [
[3,2,1,3],
[1,3,2,1],
[1,1,1,2],
]
poses = [1,7,5,9,10,21,4,3]
During a yoga class the instructor gives a list of integers poses
representing a yoga pose that each person in the class will attempt to complete.
A person can complete a yoga pose if the sum of their row and their skill level is greater than or equal to the value of the pose.
Task
Your task is to return the total amount poses completed for the entire classroom
.
Example
classroom = [
[1,1,0,1], #sum = 3
[2,0,6,0], #sum = 8
[0,2,2,0], #sum = 4
]
poses = [4, 0, 20, 10]
3 people in row 1 can complete the first pose
Everybody in row 1 can complete the second pose
Nobody in row 1 can complete the third pose
Nobody in row 1 can complete the fourth pose
The total poses completed for row 1 is 7
You'll need to return the total for all rows and all poses.
Translations are welcomed!
Mathematics
Fundamentals
Algorithms
Similar Kata:
Stats:
Created | Mar 1, 2019 |
Published | Mar 2, 2019 |
Warriors Trained | 1481 |
Total Skips | 24 |
Total Code Submissions | 1603 |
Total Times Completed | 664 |
Python Completions | 604 |
C Completions | 66 |
Total Stars | 19 |
% of votes with a positive feedback rating | 88% of 193 |
Total "Very Satisfied" Votes | 155 |
Total "Somewhat Satisfied" Votes | 29 |
Total "Not Satisfied" Votes | 9 |
Total Rank Assessments | 15 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |