Day 12 Inheritance

today's challenge is inheritance. given a class you need to complete some methods that calculate the average score of a student and return a mark which is given in the initial script. And here is my solution below.

Read More

Day 11 2D Arrays

Context Given a 6 * 6 2D Array, A:

1
2
3
4
5
6
1 1 1 0 0 0
0 1 0 0 0 0
1 1 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

We define an hourglass in A to be a subset of values with indices falling in this pattern in A's graphical representation:

1
2
3
a b c
d
e f g

There are 16 hourglasses in A, and an hourglass sum is the sum of an hourglass' values.

Task Calculate the hourglass sum for every hourglass in A, then print the maximum hourglass sum.

Read More