Leetcode 1197 | Minimum Knight Moves (Solution Explained) | Asked by Mathworks, DoorDash, & Amazon
Автор: AverageLeeter
Загружено: 2020-12-18
Просмотров: 13257
Описание:
Today we are tackling Minimum Knight Moves (number 1197 on Leetcode). This question is commonly asked by Mathworks, Facebook, DoorDash, Amazon, Google, Indeed, Qaultrics, and Cisco. I hope you like this in-depth explanation of a solution.
Music: / djganu
Timestamps:
0:00 - 1:15 - Introduction and Problem Overview
1:16 - 2:05 - First thoughts on potential solution: BFS
2:06 - 2:54 - Starts Coding
2:55 - 3:45 - Coordinate Class
3:46 - 4:20 - Back to Code
4:21 - 5:25 - BFS Implementation
5:26 - 6:34 - How do We Get the Neighbors?
6:35 - 8:08 - Directions!
8:09 - 10:00 - Adding the Directions to Our Current Coordinate
10:01 - 11:29 - Correctly Incrementing and Returning Moves
11:30 - 12:11 - Finished Brute - Force
12:12 - 12:41 - How to Make Solution More Efficient!
12:42 - 16:19 - Visited Set
16:20 - 19:24 - Reducing the Size of Our Search Space
19:25 - 21:49 - Corner Case
21:50 - 22:20 - Runtime/Space Time Complexities
22:21 - 23:01 - Conclusion
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: