Skip to content
shawnlyu

shawnlyu

Velut arbor aevo.

  • Home
  • Algorithms
  • Tech
  • Snowboarding
  • About me
  • Account
    • Register
    • Edit Profile
    • Log In

Tag: postorder

Posted on May 26, 2020June 20, 2020

[Leetcode for Interviews] BinaryTree Traversal – DFS & BFS

After introducing traversing trees using BFS and DFS in Tree Traversal – Recursively & Iteratively – Preorder, Inorder, Postorder, it’s time to get some practices! Here are Leetcode questions that appear frequently during tech interviews.

Continue reading “[Leetcode for Interviews] BinaryTree Traversal – DFS & BFS”
Posted on May 24, 2020July 9, 2020

Tree Traversal – Recursively & Iteratively

Tree traversal refers to the process of visiting each node in a tree data structure (Wikipedia). The two general strategies are Depth-First-Search (DFS) and Breadth-First-Search (BFS). For BFS, it iterates through the tree level by level with Queue, from top to bottom. When using DFS, there are three different ways: Preorder, Inorder, and Postorder.

Continue reading “Tree Traversal – Recursively & Iteratively”

Recent Posts

  • LeetCode Authorized Author
  • Database Index
  • Java Garbage Collection
  • [Leetcode]1626. Best Team With No Conflicts
  • [Challenge]Minimum adjacent swaps required to Sort Binary array

Recent Comments

  • Hairstyles on Intro to Graph Algorithms – BFS & DFS

Categories

  • Algorithms (16)
  • Leetcode (71)
  • Snowboarding (1)
  • Tech (2)

Tags

  • array
  • backtracking
  • bfs
  • binary search
  • bit operation
  • bitwise operators
  • bucket sort
  • complexity analysis
  • cycle detection
  • dfs
  • dijkstra
  • divide and conquer
  • dp
  • easy
  • graph algorithms
  • greedy
  • hard
  • hashmap
  • heap
  • inorder
  • insertion sort
  • Leetcode
  • Leetcode contest
  • Leetcode for interviews
  • math
  • medium
  • mergesort
  • monotone stack
  • postorder
  • prefix sum
  • preorder
  • pruning
  • quicksort
  • recursion
  • selection sort
  • shortest path
  • sliding window
  • sort
  • sorting algorithms
  • state machine
  • string
  • topological sort
  • Tree traversal
  • trie
  • two pointers

Archives

  • November 2020 (2)
  • October 2020 (2)
  • September 2020 (20)
  • August 2020 (16)
  • July 2020 (24)
  • June 2020 (19)
  • May 2020 (7)

Pages

  • About me
  • Edit Profile
  • Log In
  • Register
  • Privacy Policy
  • Terms and Conditions

Visits

48735

Proudly powered by WordPress

Privacy Policy - Terms and Conditions