🚀 NeetCode 973 Algorithm HandbookBlind 75 · NC 150 · NC 25019 Core Categories

NeetCode Comprehensive Algorithm Bank & Offline Handbook

Synchronized bilingual toggle with dual NeetCode & LeetCode problem numbering and direct links. Features step-by-step logic, benchmark Python3 code, complexity analysis, interview pitfalls, and standalone offline exports.

Mastery Progress
0.0%(0/973)
● Mastered: 0
◐ Reviewing: 0
○ Unstarted: 973
🔍
🎯 Featured Lists
📂 Categories (19 Core Topics)
Diff:
Mastery:
Showing 24 problems
NeetCode #457LC-173Trees
Medium

Binary Search Tree Iterator (二叉搜索树迭代器)

Implement a BSTIterator over the in-order traversal of a binary search tree, supporting next() (the next smallest value) and hasNe...

View Solution→
NeetCode #458LC-1361Trees
Medium

Validate Binary Tree Nodes (验证二叉树)

You have n binary tree nodes numbered 0..n-1, given leftChild and rightChild arrays where -1 means no child. Return true if they f...

View Solution→
NeetCode #459LC-515Trees
Medium

Find Largest Value in Each Tree Row (在每个树行中找最大值)

Given the root of a binary tree, return an array of the largest value in each level. Constraints: the number of nodes is in [0, 10...

View Solution→
NeetCode #460LC-1457Trees
Medium

Pseudo-Palindromic Paths in a Binary Tree (二叉树中的伪回文路径)

Given the root of a binary tree where node values are digits 1..9, a path is pseudo-palindromic if at most one digit appears an od...

View Solution→
NeetCode #461LC-1609Trees
Medium

Even Odd Tree (奇偶树)

A binary tree is even-odd if: every even-indexed level (the root is level 0) has strictly increasing values that are all odd, and ...

View Solution→
NeetCode #462LC-988Trees
Medium

Smallest String Starting From Leaf (从叶结点开始的最小字符串)

Given the root of a binary tree where each node holds a value from 0 to 25 (mapping to a-z), each root-to-leaf path forms a string...

View Solution→
NeetCode #463LC-1325TreesNC 250
Medium

Delete Leaves With a Given Value (删除给定值的叶子节点)

Given the root of a binary tree and an integer target, repeatedly delete all leaf nodes with value target until no more such leave...

View Solution→
NeetCode #464LC-1110Trees
Medium

Delete Nodes And Return Forest (删点成林)

Given the root of a binary tree and an array to_delete of values to remove, delete those nodes and return the roots of the resulti...

View Solution→
NeetCode #465LC-979Trees
Medium

Distribute Coins in Binary Tree (在二叉树中分配硬币)

Given the root of a binary tree with n nodes, each node has node.val coins, and there are n coins in total. In one move you may mo...

View Solution→
NeetCode #466LC-538Trees
Medium

Convert BST to Greater Tree (把二叉搜索树转换为累加树)

Given the root of a binary search tree, convert it to a greater sum tree: every node's new value is the sum of all values greater ...

View Solution→
NeetCode #467LC-2096Trees
Medium

Step-By-Step Directions From a Binary Tree Node to Another (从二叉树一个节点到另一个节点每一步的方向)

Given the root of a binary tree with unique values from 1 to n, and two values startValue and endValue, return the shortest path f...

View Solution→
NeetCode #468LC-510Trees
Medium

Inorder Successor in BST II (二叉搜索树中的中序后继 II)

Given a node in a binary search tree where every node has a parent pointer, return its in-order successor (the next node in the in...

View Solution→
NeetCode #469LC-1245Trees
Medium

Tree Diameter (树的直径)

Given an undirected tree represented as a list of edges, return its diameter: the number of edges on the longest path between any ...

View Solution→
NeetCode #470LC-426Trees
Medium

Convert Binary Search Tree to Sorted Doubly Linked List (将二叉搜索树转化为排序的双向链表)

Convert a binary search tree into a sorted circular doubly linked list in place, where left is the predecessor and right is the su...

View Solution→
NeetCode #471LC-156Trees
Medium

Binary Tree Upside Down (上下翻转二叉树)

Given the root of a binary tree, turn it upside down: the original leftmost path becomes the new left spine, with each original le...

View Solution→
NeetCode #472LC-1028Trees
Hard

Recover a Tree From Preorder Traversal (从先序遍历还原二叉树)

We run a pre-order depth-first search on a binary tree, outputting D dashes followed by the node value, where D is the node's dept...

View Solution→
NeetCode #473LC-124TreesBlind 75NC 150NC 250
Hard

Binary Tree Maximum Path Sum (二叉树中的最大路径和)

A path in a binary tree is a sequence of nodes where each pair of adjacent nodes is connected by an edge; a node may appear at mos...

View Solution→
NeetCode #474LC-297TreesBlind 75NC 150NC 250
Hard

Serialize and Deserialize Binary Tree (二叉树的序列化与反序列化)

Design an algorithm to serialise a binary tree into a string and deserialise that string back into the original tree. Constraints:...

View Solution→
NeetCode #475LC-3042Tries
Easy

Count Prefix and Suffix Pairs I (统计前后缀下标对 I)

You are given a 0-indexed array of strings words. Return the number of pairs (i, j) with i < j such that words[i] is both a pre...

View Solution→
NeetCode #476LC-208TriesBlind 75NC 150NC 250
Medium

Implement Trie (Prefix Tree) (实现 Trie(前缀树))

Implement a trie (prefix tree) with insert(word), search(word) and startsWith(prefix). Constraints: 1 <= word.length, prefix.le...

View Solution→
NeetCode #477LC-211TriesBlind 75NC 150NC 250
Medium

Design Add and Search Words Data Structure (添加与搜索单词 - 数据结构设计)

Design a data structure supporting addWord(word) and search(word), where search may contain . matching any single letter. Constrai...

View Solution→
NeetCode #478LC-2185Tries
Easy

Counting Words With a Given Prefix (统计包含给定前缀的字符串)

You are given an array of strings words and a string pref. Return the number of strings in words that contain pref as a prefix. Co...

View Solution→
NeetCode #479LC-1233Tries
Medium

Remove Sub-Folders from the Filesystem (删除子文件夹)

Given a list of absolute folder paths folder, remove all sub-folders and return the remaining paths in any order. Constraints: 1 &...

View Solution→
NeetCode #480LC-2707TriesNC 250
Medium

Extra Characters in a String (字符串中的额外字符)

You are given a string s and a dictionary of words. Break s into the dictionary words plus leftover single characters; return the ...

View Solution→