Skip to content
shawnlyu

shawnlyu

Velut arbor aevo.

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

Tag: recursion

Posted on May 27, 2020June 26, 2020

[Leetcode]1008. Construct Binary Search Tree from Preorder Traversal

LeetCode_logo
Question:
Given a preorder traversal, reconstruct the binary search tree and return the root.
Input: [8,5,1,7,10,12]
Output: [8,5,10,1,7,null,12]
Visiualization of the output:
Continue reading “[Leetcode]1008. Construct Binary Search Tree from Preorder Traversal”

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

48730

Proudly powered by WordPress

Privacy Policy - Terms and Conditions