GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing leetcodejavascript.com — Binary Tree LeetCode Problems | JavaScript Solutions

Binary Tree | LeetCode Problems

175 Binary Tree solutions to LeetCode solutions.

View Source Code on GitHub
All 2765 Array 1587 String 683 Hash Table 587 Math 485 Dynamic Programming 458 Sorting 384 Greedy 348 Depth-First Search 293 Binary Search 241 Tree 227 Breadth-First Search 224 Matrix 223 Two Pointers 200 Bit Manipulation 197 Binary Tree 175 Prefix Sum 159 Stack 154 Heap Priority Queue 152 Simulation 150 Counting 134 Graph 133 Design 123 Sliding Window 112 Backtracking 104 Union Find 79 Enumeration 78 Linked List 78 Ordered Set 60 Monotonic Stack 55 Trie 51 Number Theory 47 Divide and Conquer 46 Recursion 45 Bitmask 41 Queue 41 Binary Search Tree 40 Segment Tree 38 Memoization 36 Geometry 36 Combinatorics 35 Topological Sort 33 Hash Function 30 Binary Indexed Tree 28 Game Theory 26 String Matching 23 Shortest Path 23 Interactive 23 Rolling Hash 22 Data Stream 20 Brainteaser 16 Monotonic Queue 14 Randomized 12 Merge Sort 12 Doubly-Linked List 11 Counting Sort 10 Iterator 9 Probability and Statistics 7 Quickselect 7 Suffix Array 6 Bucket Sort 6 Line Sweep 5 Minimum Spanning Tree 5 Reservoir Sampling 4 Strongly Connected Component 3 Eulerian Circuit 3 Radix Sort 3 Rejection Sampling 2 Biconnected Component 1

Binary Tree Problems View all solutions →

Binary Tree Inorder Traversal

#94 Easy

Unique Binary Search Trees II

#95 Medium

Unique Binary Search Trees

#96 Medium

Validate Binary Search Tree

#98 Medium

Recover Binary Search Tree

#99 Medium

Same Tree

#100 Easy

Symmetric Tree

#101 Easy

Binary Tree Level Order Traversal

#102 Medium

Binary Tree Zigzag Level Order Traversal

#103 Medium

Maximum Depth of Binary Tree

#104 Easy

Construct Binary Tree from Preorder and Inorder Traversal

#105 Medium

Construct Binary Tree from Inorder and Postorder Traversal

#106 Medium

Binary Tree Level Order Traversal II

#107 Medium

Convert Sorted Array to Binary Search Tree

#108 Easy

Convert Sorted List to Binary Search Tree

#109 Medium

Balanced Binary Tree

#110 Easy

Minimum Depth of Binary Tree

#111 Easy

Path Sum

#112 Easy

Path Sum II

#113 Medium

Flatten Binary Tree to Linked List

#114 Medium

Populating Next Right Pointers in Each Node

#116 Medium

Populating Next Right Pointers in Each Node II

#117 Medium

Binary Tree Maximum Path Sum

#124 Hard

Sum Root to Leaf Numbers

#129 Medium

Binary Tree Preorder Traversal

#144 Easy

Binary Tree Postorder Traversal

#145 Easy

Binary Tree Upside Down

#156 Medium

Binary Search Tree Iterator

#173 Medium

Binary Tree Right Side View

#199 Medium

Count Complete Tree Nodes

#222 Easy

Invert Binary Tree

#226 Easy

Kth Smallest Element in a BST

#230 Medium

Lowest Common Ancestor of a Binary Search Tree

#235 Easy

Lowest Common Ancestor of a Binary Tree

#236 Medium

Count Univalue Subtrees

#250 Medium

Verify Preorder Sequence in Binary Search Tree

#255 Medium

Binary Tree Paths

#257 Easy

Closest Binary Search Tree Value

#270 Easy

Closest Binary Search Tree Value II

#272 Hard

Inorder Successor in BST

#285 Medium

Serialize and Deserialize Binary Tree

#297 Hard

Binary Tree Longest Consecutive Sequence

#298 Medium

Binary Tree Vertical Order Traversal

#314 Medium

Verify Preorder Serialization of a Binary Tree

#331 Medium

Largest BST Subtree

#333 Medium

House Robber III

#337 Medium

Find Leaves of Binary Tree

#366 Medium

Sum of Left Leaves

#404 Easy

Convert Binary Search Tree to Sorted Doubly Linked List

#426 Medium

Encode N-ary Tree to Binary Tree

#431 Hard

Path Sum III

#437 Medium

Serialize and Deserialize BST

#449 Medium

Delete Node in a BST

#450 Medium

Find Mode in Binary Search Tree

#501 Easy

Most Frequent Subtree Sum

#508 Medium

Inorder Successor in BST II

#510 Medium

Find Bottom Left Tree Value

#513 Medium

Find Largest Value in Each Tree Row

#515 Medium

Minimum Absolute Difference in BST

#530 Easy

Construct Binary Tree from String

#536 Medium

Convert BST to Greater Tree

#538 Medium

Diameter of Binary Tree

#543 Easy

Boundary of Binary Tree

#545 Medium

Binary Tree Longest Consecutive Sequence II

#549 Medium

Binary Tree Tilt

#563 Easy

Subtree of Another Tree

#572 Easy

Construct String from Binary Tree

#606 Easy

Merge Two Binary Trees

#617 Easy

Add One Row to Tree

#623 Medium

Average of Levels in Binary Tree

#637 Easy

Find Duplicate Subtrees

#652 Medium

Two Sum IV - Input is a BST

#653 Easy

Maximum Binary Tree

#654 Medium

Print Binary Tree

#655 Medium

Maximum Width of Binary Tree

#662 Medium

Equal Tree Partition

#663 Medium

Path Sum IV

#666 Medium

Trim a Binary Search Tree

#669 Medium

Second Minimum Node In a Binary Tree

#671 Easy

Longest Univalue Path

#687 Medium

Search in a Binary Search Tree

#700 Easy

Insert into a Binary Search Tree

#701 Medium

Kth Largest Element in a Stream

#703 Easy

Closest Leaf in a Binary Tree

#742 Medium

Split BST

#776 Medium

Minimum Distance Between BST Nodes

#783 Easy

Binary Tree Pruning

#814 Medium

All Nodes Distance K in Binary Tree

#863 Medium

Smallest Subtree with all the Deepest Nodes

#865 Medium

Leaf-Similar Trees

#872 Easy

Construct Binary Tree from Preorder and Postorder Traversal

#889 Medium

All Possible Full Binary Trees

#894 Medium

Increasing Order Search Tree

#897 Easy

Complete Binary Tree Inserter

#919 Medium

Range Sum of BST

#938 Easy

Flip Equivalent Binary Trees

#951 Medium

Check Completeness of a Binary Tree

#958 Medium

Univalued Binary Tree

#965 Easy

Binary Tree Cameras

#968 Hard

Flip Binary Tree To Match Preorder Traversal

#971 Medium

Distribute Coins in Binary Tree

#979 Medium

Vertical Order Traversal of a Binary Tree

#987 Hard

Smallest String Starting From Leaf

#988 Medium

Cousins in Binary Tree

#993 Easy

Maximum Binary Tree II

#998 Medium

Construct Binary Search Tree from Preorder Traversal

#1008 Medium

Sum of Root To Leaf Binary Numbers

#1022 Easy

Maximum Difference Between Node and Ancestor

#1026 Medium

Recover a Tree From Preorder Traversal

#1028 Hard

Binary Search Tree to Greater Sum Tree

#1038 Medium

Insufficient Nodes in Root to Leaf Paths

#1080 Medium

Path In Zigzag Labelled Binary Tree

#1104 Medium

Delete Nodes And Return Forest

#1110 Medium

Maximum Average Subtree

#1120 Medium

Lowest Common Ancestor of Deepest Leaves

#1123 Medium

Binary Tree Coloring Game

#1145 Medium

Maximum Level Sum of a Binary Tree

#1161 Medium

Two Sum BSTs

#1214 Medium

Find Elements in a Contaminated Binary Tree

#1261 Medium

Deepest Leaves Sum

#1302 Medium

All Elements in Two Binary Search Trees

#1305 Medium

Sum of Nodes with Even-Valued Grandparent

#1315 Medium

Delete Leaves With a Given Value

#1325 Medium

Maximum Product of Splitted Binary Tree

#1339 Medium

Validate Binary Tree Nodes

#1361 Medium

Linked List in Binary Tree

#1367 Medium

Longest ZigZag Path in a Binary Tree

#1372 Medium

Maximum Sum BST in Binary Tree

#1373 Hard

Find a Corresponding Node of a Binary Tree in a Clone of That Tree

#1379 Easy

Balance a Binary Search Tree

#1382 Medium

Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree

#1430 Medium

Count Good Nodes in Binary Tree

#1448 Medium

Pseudo-Palindromic Paths in a Binary Tree

#1457 Medium

Find All The Lonely Nodes

#1469 Easy

Clone Binary Tree With Random Pointer

#1485 Medium

Number of Good Leaf Nodes Pairs

#1530 Medium

Number of Ways to Reorder Array to Get Same BST

#1569 Hard

Binary Search Tree Iterator II

#1586 Medium

Build Binary Expression Tree From Infix Expression

#1597 Hard

Find Nearest Right Node in Binary Tree

#1602 Medium

Even Odd Tree

#1609 Medium

Check If Two Expression Trees are Equivalent

#1612 Medium

Design an Expression Tree With Evaluate Function

#1628 Medium

Lowest Common Ancestor of a Binary Tree II

#1644 Medium

Lowest Common Ancestor of a Binary Tree III

#1650 Medium

Correct a Binary Tree

#1660 Medium

Change the Root of a Binary Tree

#1666 Medium

Lowest Common Ancestor of a Binary Tree IV

#1676 Medium

Find Distance in a Binary Tree

#1740 Medium

Depth of BST Given Insertion Order

#1902 Medium

Merge BSTs to Create Single BST

#1932 Hard

Count Nodes Equal to Sum of Descendants

#1973 Medium

Subtree Removal Game with Fibonacci Tree

#2005 Hard

Count Nodes With the Highest Score

#2049 Medium

Step-By-Step Directions From a Binary Tree Node to Another

#2096 Medium

Create Binary Tree From Descriptions

#2196 Medium

Root Equals Sum of Children

#2236 Easy

Count Nodes Equal to Average of Subtree

#2265 Medium

Minimum Flips in Binary Tree to Get Result

#2313 Hard

Evaluate Boolean Binary Tree

#2331 Easy

Amount of Time for Binary Tree to Be Infected

#2385 Medium

Reverse Odd Levels of Binary Tree

#2415 Medium

Number of Nodes With Value One

#2445 Medium

Height of Binary Tree After Subtree Removal Queries

#2458 Hard

Minimum Number of Operations to Sort a Binary Tree by Level

#2471 Medium

Closest Nodes Queries in a Binary Search Tree

#2476 Medium

Cycle Length Queries in a Tree

#2509 Hard

Kth Largest Sum in a Binary Tree

#2583 Medium

Cousins in Binary Tree II

#2641 Medium

Make Costs of Paths Equal in a Binary Tree

#2673 Medium

Extract Kth Character From The Rope Tree

#2689 Easy

Is Array a Preorder of Some ‌Binary Tree

#2764 Medium

Height of Special Binary Tree

#2773 Medium

Count Nodes That Are Great Enough

#2792 Hard

Find the Level of Tree with Minimum Sum

#3157 Medium
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.