Out of Memory! Hackerrank Medium: Queen's Attack II Python

Published: 02 July 2020
on channel: Wes Doyle
1,533
45

Learn Python for free at Productive Dev:
courses.productivedev.com

Here I try a Medium Hackerrank algorithm problem called Queen's Attack II.
The first solution uses unnecessary space and results in an out of memory error. It turns out that O(n^2) space is a problem!

The second solution runs in O(k) time and O(1) space where k is the number of obstacles.


Watch video Out of Memory! Hackerrank Medium: Queen's Attack II Python online without registration, duration hours minute second in high quality. This video was added by user Wes Doyle 02 July 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,533 once and liked it 45 people.