HackerRank Interview Prep - Problem 5: 2D Array - DS

Опубликовано: 25 October 2020
на канале: Brian Dyck
1,855
22

Solution at:

Hello, my name is Brian Dyck, I am a full-time software engineer and a Computer Science graduate walking through HackerRank problems for new and old programmers alike. My goal is to help programmers build up skills and not just see the solutions to problems, but to learn how to think through the problems. Many new videos to come, so stay tuned!

Today's Problem: 2D Array - DS
Description:
Given a 6 X 6 2D Array, arr:

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

An hour glass A is a subset of values with indices falling in this pattern in arr's graphical representation:

a b c
d
e f g

There are 16 hourglasses in arr. An hourglass sum is the sum of an hourglass' values. Calculate the hourglass sum for every hourglass in arr, then print the maximum hourglass sum. The array will always be 6 x 6.


На этой странице сайта вы можете посмотреть видео онлайн HackerRank Interview Prep - Problem 5: 2D Array - DS длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Brian Dyck 25 October 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,855 раз и оно понравилось 22 зрителям. Приятного просмотра!