DFS Traversals: Preorder, Inorder, Postorder

23:31
© Code and DebugCurated by YodaHut. These lessons are hosted on YouTube and produced by their original creators, who are not affiliated with YodaHut. You still earn YodaCoins, keep your streak and track progress here.

My Notes (0)

Sign in to take timestamped notes, earn YodaCoins and keep your streak.

No notes yet. Notes are private to you and jump the video to the moment you wrote them.

Course Contents

  1. 1Course Introduction0:56
  2. 2Time and Space Complexity36:16
  3. 3Time Limit Exceeded (TLE) Errors5:28
  4. 4Time Complexity of Common Python Operations14:05
  5. 5Extracting Digits Using Loops6:14
  6. 6Counting the Digits in an Integer8:32
  7. 7Palindrome Number9:31
  8. 8Armstrong Number8:51
  9. 9Print All Factors of a Number20:28
  10. 10Store Frequency in a Dictionary16:50
  11. 11Introduction to Hashing27:47
  12. 12Introduction to Recursion25:03
  13. 13Recursion Using Parameters18:31
  14. 14Functional Recursion16:18
  15. 15Factorial of a Number9:06
  16. 16Reverse an Array Using Recursion15:00
  17. 17Check if a String Is a Palindrome20:57
  18. 18Fibonacci Number11:18
  19. 19Selection Sort13:13
  20. 20Bubble Sort17:43
  21. 21Insertion Sort17:53
  22. 22Merge Sort31:56
  23. 23Quick Sort29:34
  24. 24Largest Element in an Array9:49
  25. 25Second Largest Element Without Sorting15:02
  26. 26Check if an Array Is Sorted5:22
  27. 27Remove Duplicates from a Sorted Array20:05
  28. 28Right Rotate an Array by One Place9:32
  29. 29Rotate Array by K Places (LeetCode 189)22:17
  30. 30Move Zeros to the End (LeetCode 283)18:14
  31. 31Linear Search4:53
  32. 32Merge Two Sorted Arrays Without Duplicates14:43
  33. 33Missing Number (LeetCode 268)14:44
  34. 34Max Consecutive Ones (LeetCode 485)9:46
  35. 35Two Sum (LeetCode 1)16:44
  36. 36Maximum Subarray Sum (LeetCode 53)19:40
  37. 37Best Time to Buy and Sell Stock (LeetCode 121)17:17
  38. 38Rearrange Array Elements by Sign (LeetCode 2149)18:17
  39. 39Longest Consecutive Sequence (LeetCode 128)29:53
  40. 402D Lists and Matrices25:53
  41. 41Set Matrix Zeroes (LeetCode 73)30:18
  42. 42Rotate Matrix by 90 Degrees (LeetCode 48)26:58
  43. 43Spiral Matrix (LeetCode 54)21:40
  44. 443Sum (LeetCode 15)39:46
  45. 454Sum (LeetCode 18)39:10
  46. 46Introduction to Binary Search35:06
  47. 47Lower Bound and Upper Bound22:39
  48. 48Search Insert Position (LeetCode 35)7:24
  49. 49Floor and Ceil in a Sorted Array10:50
  50. 50First and Last Occurrence in a Sorted Array16:10
  51. 51Count Occurrences in a Sorted Array10:24
  52. 52Search in Rotated Sorted Array (LeetCode 33)18:29
  53. 53Search in Rotated Sorted Array II (LeetCode 81)12:19
  54. 54Minimum in Rotated Sorted Array (LeetCode 153)16:57
  55. 55Introduction to Linked Lists11:08
  56. 56Singly Linked List Operations41:11
  57. 57Middle of the Linked List (LeetCode 876)15:17
  58. 58Reverse a Linked List (LeetCode 206)19:21
  59. 59Linked List Cycle (LeetCode 141)17:34
  60. 60Linked List Cycle II (LeetCode 142)18:00
  61. 61Length of a Loop in a Linked List16:55
  62. 62Odd Even Linked List (LeetCode 328)23:21
  63. 63Remove Nth Node from End of List (LeetCode 19)20:04
  64. 64What Is a Doubly Linked List?4:51
  65. 65Doubly Linked List Methods23:27
  66. 66Reverse a Doubly Linked List17:34
  67. 67Delete All Occurrences of a Key in a Doubly Linked List14:41
  68. 68Find Pairs with Given Sum in a Doubly Linked List26:24
  69. 69Remove Duplicates from a Sorted Doubly Linked List9:32
  70. 70Introduction to Bit Manipulation33:43
  71. 71Bit Manipulation Basics: Set, Clear, Toggle, Swap33:01
  72. 72Minimum Bit Flips to Convert a Number9:42
  73. 73Single Number (LeetCode 136)8:13
  74. 74Subsets Using Bit Manipulation (LeetCode 78)15:10
  75. 75Generate All Subsequences Using Recursion35:58
  76. 76Generate Subsequences with Sum K33:11
  77. 77Check if a Subsequence with Sum K Exists22:41
  78. 78Count Subsequences with Sum K24:15
  79. 79Generate All Binary Strings24:15
  80. 80Generate Parentheses (LeetCode 22)25:42
  81. 81Combination Sum (LeetCode 39)24:37
  82. 82Combination Sum II (LeetCode 40)33:22
  83. 83Subset Sums16:26
  84. 84Combination Sum III (LeetCode 216)21:58
  85. 85Letter Combinations of a Phone Number (LeetCode 17)20:56
  86. 86N-Queens (LeetCode 51)48:28
  87. 87Rat in a Maze29:49
  88. 88Implement a Stack Using Arrays21:12
  89. 89Implement a Queue Using Arrays14:35
  90. 90Deque in Python9:04
  91. 91Implement a Stack Using Queues13:05
  92. 92Implement a Queue Using Stacks11:51
  93. 93Stack and Queue Using a Doubly Linked List8:55
  94. 94Valid Parentheses (LeetCode 20)16:22
  95. 95Min Stack (LeetCode 155)11:11
  96. 96Infix, Postfix and Prefix Conversions45:40
  97. 97Next Greater Element20:08
  98. 98Next Greater Element II (LeetCode 503)12:47
  99. 99Asteroid Collision (LeetCode 735)18:14
  100. 100Longest Substring Without Repeating Characters (LeetCode 3)29:03
  101. 101Max Consecutive Ones III (LeetCode 1004)28:46
  102. 102Fruit Into Baskets (LeetCode 904)30:45
  103. 103Maximum Points You Can Obtain from Cards (LeetCode 1423)11:56
  104. 104Assign Cookies (LeetCode 455)12:17
  105. 105Fractional Knapsack20:08
  106. 106Minimum Number of Coins9:22
  107. 107Lemonade Change (LeetCode 860)11:13
  108. 108N Meetings in One Room15:42
  109. 109Jump Game (LeetCode 55)9:46
  110. 110Jump Game II (LeetCode 45)21:13
  111. 111Minimum Platforms Required18:39
  112. 112Introduction to Binary Trees16:38
  113. 113Binary Tree Node Class and Construction8:45
  114. 114DFS Traversals: Preorder, Inorder, Postorder23:31
  115. 115Level Order Traversal (BFS)11:39
  116. 116Height of a Binary Tree (LeetCode 104)18:39
  117. 117Diameter of a Binary Tree (LeetCode 543)11:22
  118. 118Balanced Binary Tree (LeetCode 110)10:13
  119. 119Binary Tree Maximum Path Sum (LeetCode 124)13:53
  120. 120Top View of a Binary Tree14:55
  121. 121Bottom View of a Binary Tree8:36
  122. 122Right Side View of a Binary Tree (LeetCode 199)19:24
  123. 123Introduction to Graphs15:55
  124. 124Graph Representation in Python22:44
  125. 125Connected Components in Graphs6:40
  126. 126BFS Traversal of a Graph21:34
  127. 127DFS Traversal of a Graph19:11
  128. 128Rotting Oranges (LeetCode 994)29:28
  129. 129Flood Fill (LeetCode 733)34:03
  130. 130Detect Cycle in an Undirected Graph (BFS)21:13
  131. 131Detect Cycle in an Undirected Graph (DFS)15:24
  132. 13201 Matrix (LeetCode 542)25:42
  133. 133Surrounded Regions (LeetCode 130)29:08
  134. 134Number of Enclaves (LeetCode 1020)25:23
  135. 135Word Ladder (LeetCode 127)35:06
  136. 136Word Ladder II (LeetCode 126)23:06
  137. 137Number of Islands (LeetCode 200)25:18
  138. 138Count Distinct Islands30:40
  139. 139Is Graph Bipartite? (LeetCode 785)23:42
  140. 140Topological Sort Using DFS17:10
  141. 141Detect Cycle in a Directed Graph (DFS)23:13
  142. 142Topological Sort Using Kahn's Algorithm15:24
  143. 143Detect Cycle in a Directed Graph Using Kahn's Algorithm6:13
  144. 144Course Schedule I and II (LeetCode 207, 210)11:59
  145. 145Eventual Safe States (BFS / Topological Sort)19:57
  146. 146Eventual Safe States (DFS)18:54
  147. 147Alien Dictionary7:30
  148. 148Shortest Path in an Undirected Graph with Unit Distance16:06
  149. 149Shortest Path in a Weighted DAG28:58
  150. 150Dijkstra's Algorithm with a Priority Queue22:27
  151. 151Dijkstra's Algorithm with a Set17:23
  152. 152Why Dijkstra Needs a Priority Queue16:30
  153. 153Print the Shortest Path with Dijkstra21:31
  154. 154Shortest Path in Binary Matrix (LeetCode 1091)22:23
  155. 155Path With Minimum Effort (LeetCode 1631)21:56
  156. 156Cheapest Flights Within K Stops (LeetCode 787)25:26
  157. 157Minimum Multiplications to Reach End14:35
  158. 158Number of Ways to Arrive at Destination (LeetCode 1976)26:49
  159. 159Bellman-Ford Algorithm25:53
  160. 160Floyd-Warshall Algorithm30:16
  161. 161City With the Smallest Number of Neighbors (LeetCode 1334)14:13
  162. 162Minimum Spanning Tree Concepts7:03
  163. 163Prim's Algorithm19:09
  164. 164Disjoint Set (Union-Find)44:37
  165. 165Kruskal's Algorithm16:10
  166. 166Number of Provinces Using Union-Find10:31
  167. 167Make Network Connected (LeetCode 1319)18:34
  168. 168Introduction to Binary Search Trees7:37
  169. 169Search in a BST6:57
  170. 170Minimum Element in a BST5:35
  171. 171Ceil in a BST10:33
  172. 172Floor in a BST5:08
  173. 173Insert into a BST7:48
  174. 174Delete Node in a BST14:10
  175. 175Morris Traversal21:40
  176. 176Kth Smallest Element in a BST10:39
  177. 177Validate Binary Search Tree12:25
  178. 178Lowest Common Ancestor of a BST19:20
  179. 179Predecessor and Successor in a BST11:55
  180. 180Priority Queues and Binary Heaps22:35
  181. 181Heapify Algorithm22:26
  182. 182Implement a Min Heap13:00
  183. 183Implement a Max Heap7:07
  184. 184Check if an Array Represents a Min Heap7:27
  185. 185Build a Heap from an Array15:22
  186. 186Convert a Min Heap to a Max Heap2:20
  187. 187Heap Sort16:19
  188. 188Kth Largest Element in an Array (QuickSelect)38:29
  189. 189Kth Largest Element in a Stream9:27
  190. 190Introduction to Dynamic Programming37:59
  191. 191Climbing Stairs11:10
  192. 192Frog Jump35:09
  193. 193House Robber II11:03
  194. 194House Robber29:40
  195. 195Geek's Training (2D DP)50:42
  196. 196Unique Paths II9:36
  197. 197Unique Paths43:44
  198. 198Minimum Path Sum23:17
  199. 199Triangle: Minimum Path Sum32:16
  200. 200Minimum Falling Path Sum34:41
  201. 201Cherry Pickup II37:32
  202. 202Partition Equal Subset Sum6:20
  203. 203Subset Sum Equal to Target35:40
  204. 204Partition into Two Subsets with Minimum Difference21:19
  205. 205Count Subsets with Sum K36:30
  206. 206Count Partitions with Given Difference8:47
  207. 2070/1 Knapsack37:41
  208. 208Longest Common Subsequence53:59
  209. 209Print the Longest Common Subsequence18:58
  210. 210Longest Common Substring14:29
  211. 211Longest Palindromic Subsequence9:19
  212. 212Minimum Insertions to Make a String Palindrome11:43
  213. 213Delete Operation for Two Strings9:31
  214. 214Best Time to Buy and Sell Stock II37:46
  215. 215Best Time to Buy and Sell Stock III32:32
  216. 216Best Time to Buy and Sell Stock IV5:26
  217. 217Remove Outermost Parentheses11:46
  218. 218Reverse Words in a String7:44
  219. 219Largest Odd Number in a String6:55
  220. 220Longest Common Prefix17:12
  221. 221Isomorphic Strings15:50
  222. 222Rotate String13:21
  223. 223Valid Anagram15:18
  224. 224Sort Characters by Frequency11:32
  225. 225Maximum Nesting Depth of Parentheses10:21
  226. 226Roman to Integer12:33
  227. 227Implement Trie (Prefix Tree)32:59
  228. 228Implement Trie II20:57
  229. 229Complete String22:08
  230. 230Count Distinct Substrings13:09
Lessons by Code and Debug on YouTube. Curated by YodaHut — we didn't make this content.