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.
Смотрите видео Out of Memory! Hackerrank Medium: Queen's Attack II Python онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Wes Doyle 02 Июль 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,533 раз и оно понравилось 45 людям.