Java Competitive Coding 02: HackerRank Magic Squares Challenge

Java Competitive Coding 02: HackerRank Magic Squares Challenge

Breakthrough

4 года назад

12,474 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@smanqele
@smanqele - 01.11.2022 12:11

Thank you for the hack, but how would you approach this without the copying that you did, like in a test situation?

Ответить
@dan7582
@dan7582 - 19.05.2022 02:51

I don't like this type of problem, I prefer problems that you can come up with a resolution using only the information provided and reasoning. If a person never heard of magic squares, even if this person has a high IQ, he/she would take a long time to figure out these 8 possibilities. I guess almost no one could come up if these 8 magic squares intuitively using only reasoning. At Hackerrank this problem has a success rate of 77%, either they are all genius, or they at least look up the 8 magic squares on the internet. :P

Ответить
@noahjung3286
@noahjung3286 - 23.06.2021 00:29

Thank you. I had been stuck with this problem for a week and quit HackerRank for a few months and now I can continue.

Ответить
@PulkitMalhotra
@PulkitMalhotra - 14.12.2020 07:43

Explanation is good but stop putting useless background tunes

Ответить
@mirtanvirahmed3868
@mirtanvirahmed3868 - 11.11.2020 14:40

please continue making videos!!

Ответить
@mirtanvirahmed3868
@mirtanvirahmed3868 - 11.11.2020 14:40

🖤

Ответить
@danielsampedro85
@danielsampedro85 - 17.05.2020 02:41

Great! But I would use a list of 2D arrays. That way you can find the cost simply by getting the same positions like: s[i][k] - squares[i][j]

Ответить
@DEEPAKKUMAR-xe2vb
@DEEPAKKUMAR-xe2vb - 12.05.2020 12:24

Hey! Great work man you should continue making videos.

Ответить
@vishalmore3346
@vishalmore3346 - 06.05.2020 20:25

Thank you very much for this solution

Ответить
@hemantsood9579
@hemantsood9579 - 15.03.2020 17:48

why there is background music

Ответить
@itsaaron6423
@itsaaron6423 - 18.02.2020 08:46

I wish it was in JavaScript but still helps .....

Ответить
@AmarSingh-uw1db
@AmarSingh-uw1db - 27.01.2020 08:38

Great Thanks for the solution

Ответить
@philipthomas3503
@philipthomas3503 - 03.12.2019 23:04

Can this only be solved by manually solving the magic square beforehand and stashing it as data? What if it was a 4x4 or a 9x9 square, how would you compute the target value each row, column, diagonal would need to equate?

Also, may I suggest you access your 2D-arrays in a consistent manner? Viewers are here to grasp the logic of the problem and thought process to solving it and don't need to be distracted by coding styles

Ответить