🚀 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 #361LC-1209Stack
Medium

Remove All Adjacent Duplicates in String II (删除字符串中的所有相邻重复项 II)

Given a string s and an integer k, repeatedly delete k adjacent equal characters until no more deletions are possible, and return ...

View Solution→
NeetCode #362LC-1190Stack
Medium

Reverse Substrings Between Each Pair of Parentheses (反转每对括号间的子串)

You are given a string s consisting of lowercase letters and parentheses. Reverse the substrings inside each pair of matching pare...

View Solution→
NeetCode #363LC-439StackNC Algo100
Medium

Ternary Expression Parser (三元表达式解析器)

Given a string expression representing a ternary expression, evaluate it and return the result. The expression is always valid and...

View Solution→
NeetCode #364LC-484StackNC Algo100
Medium

Find Permutation (寻找排列)

A permutation perm of 1..n can be derived from a string s of length n - 1: s[i] == 'I' means perm[i] < perm[i+1] and s[i] == 'D...

View Solution→
NeetCode #365LC-772StackNC Algo100
Hard

Basic Calculator III (基本计算器 III)

Implement a basic calculator to evaluate a simple expression string containing non-negative integers, +, -, *, /, ( and ). Divisio...

View Solution→
NeetCode #366LC-716StackNC Algo100
Hard

Max Stack (最大栈)

Design a max stack supporting push(x), pop(), top(), peekMax() and popMax(). popMax() removes and returns the maximum element; if ...

View Solution→
NeetCode #367LC-2696Stack
Easy

Minimum String Length After Removing Substrings (删除子串后的字符串最小长度)

Given a string s of uppercase letters, repeatedly remove any occurrence of "AB" or "CD" until no more exist. Return the minimum po...

View Solution→
NeetCode #368LC-3174Stack
Easy

Clear Digits (清除数字)

You are given a string s. Repeatedly remove every digit and the closest non-digit character to its left, until no digits remain. R...

View Solution→
NeetCode #369LC-921Stack
Medium

Minimum Add to Make Parentheses Valid (使括号有效的最少添加)

A parentheses string is valid if it is empty, or can be written as AB or (A) where A and B are valid. Given a string s, return the...

View Solution→
NeetCode #370LC-962Stack
Medium

Maximum Width Ramp (最大宽度坡)

A ramp is a pair (i, j) with i < j and nums[i] <= nums[j]. The width is j - i. Given an array nums, return the maximum width...

View Solution→
NeetCode #371LC-227Stack
Medium

Basic Calculator II (基本计算器 II)

Given a string s representing an expression with non-negative integers and the operators +, -, *, /, evaluate it. Division truncat...

View Solution→
NeetCode #372LC-456Stack
Medium

132 Pattern (132 模式)

Given an array of n integers nums, return true if there is a 132 pattern: indices i < j < k with nums[i] < nums[k] < n...

View Solution→
NeetCode #373LC-341Stack
Medium

Flatten Nested List Iterator (扁平化嵌套列表迭代器)

This is an interactive problem. You are given a nested list of integers, where each element is either an integer or a list. Implem...

View Solution→
NeetCode #374LC-907Stack
Medium

Sum of Subarray Minimums (子数组的最小值之和)

Given an array of integers arr, return the sum of min(b) over every contiguous subarray b, modulo 10^9 + 7. Constraints: 1 <= a...

View Solution→
NeetCode #375LC-895StackNC 250
Hard

Maximum Frequency Stack (最大频率栈)

Design a stack-like structure that pops the most frequent element. If there is a tie, the element closest to the top of the stack ...

View Solution→
NeetCode #376LC-2751Stack
Hard

Robot Collisions (机器人碰撞)

You are given arrays positions, healths and directions describing robots. Robots move in their direction at the same speed; when t...

View Solution→
NeetCode #377LC-1944Stack
Hard

Number of Visible People in a Queue (队列中可以看到的人数)

There are n people in a queue, heights[i] is the height of the i-th person. A person can see the next person to the right who is t...

View Solution→
NeetCode #378LC-84StackNC 150NC 250
Hard

Largest Rectangle in Histogram (柱状图中最大的矩形)

Given an array heights representing the heights of bars of width 1 in a histogram, return the area of the largest rectangle that f...

View Solution→
NeetCode #379LC-862Stack
Hard

Shortest Subarray with Sum at Least K (和至少为 K 的最短子数组)

Given an integer array nums and an integer k, return the length of the shortest non-empty subarray with a sum of at least k. If no...

View Solution→
NeetCode #380LC-1106Stack
Hard

Parsing A Boolean Expression (解析布尔表达式)

A boolean expression is a string containing t (true), f (false), !(expr), &(expr,...) or |(expr,...). Evaluate it and return t...

View Solution→
NeetCode #381LC-726Stack
Hard

Number of Atoms (原子的数量)

Given a chemical formula, return the count of each atom as a string in the form Name followed by its count (omitted when the count...

View Solution→
NeetCode #382LC-94TreesNC 250
Easy

Binary Tree Inorder Traversal (二叉树的中序遍历)

Given the root of a binary tree, return its in-order traversal (left, root, right) as a list of values. Constraints: the number of...

View Solution→
NeetCode #383LC-144TreesNC 250
Easy

Binary Tree Preorder Traversal (二叉树的前序遍历)

Given the root of a binary tree, return its pre-order traversal (root, left, right) as a list of values. Constraints: the number o...

View Solution→
NeetCode #384LC-145TreesNC 250
Easy

Binary Tree Postorder Traversal (二叉树的后序遍历)

Given the root of a binary tree, return its post-order traversal (left, right, root) as a list of values. Constraints: the number ...

View Solution→