Validate Binary Search Tree (LeetCode 98)
The problem You get the root of a binary tree. Return if it is a valid binary…
Tag
23 posts
The problem You get the root of a binary tree. Return if it is a valid binary…
The problem You get a grid of letters and a . Return if the word can be spelled…
The problem You get a grid of and . A region of cells (connected up, down…
The problem You get two binary trees, and . Return if contains a node whose…
The problem Design a with two methods: turns a binary tree into a string…
The problem You get the roots and of two binary trees. Return if they are the…
The problem You get a list of airline tickets . Build the itinerary that starts…
The problem You get the root of a binary tree and an integer . Return if some…
The problem You get a grid of heights. The Pacific touches the top and left…
The problem You get a 2-D grid of (land) and (water). An island is a group of…
The problem You get the root of a binary tree (not a BST) and two values and…
The problem You get the root of a binary tree. Return its maximum depth: the…
The problem You get the root of a binary search tree and an integer (1-indexed…
The problem You get the root of a binary tree. Invert it, meaning produce its…
The problem You get the root of a binary tree. Return its diameter: the number…
The problem Design a with two methods: stores a word of lowercase letters…
The problem There are servers, numbered to , joined by undirected connections…
The problem You get the of a binary tree with unique values, and two different…
The problem You get the root of a binary tree whose values can be negative. A…
Twelve problems that drill the graph toolkit from Lesson 16 — DFS, BFS…
Graphs look intimidating, but interview graph problems reduce to four tools on…
If BFS is for levels, DFS is for paths and subtrees — and almost every tree DFS…
Thirteen problems that drill tree DFS from Lesson 13. The skill is recursion…