🚀 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 #649LC-1568Advanced Graphs
Hard

Minimum Number of Days to Disconnect Island (使陆地分离的最少天数)

You are given an m x n binary grid where 1 is land. In one day you may change one land cell to water. Return the minimum number of...

View Solution→
NeetCode #650LC-2045Advanced Graphs
Hard

Second Minimum Time to Reach Destination (到达目的地的第二短时间)

There are n intersections connected by bidirectional roads, each traversal taking time minutes. Traffic lights change every change...

View Solution→
NeetCode #651LC-3203Advanced Graphs
Hard

Find Minimum Diameter After Merging Two Trees (合并两棵树后的最小直径)

You are given two trees described by edges1 and edges2. You must add exactly one edge connecting a node of the first tree to a nod...

View Solution→
NeetCode #652LC-1489Advanced GraphsNC 250
Hard

Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree (找到最小生成树里的关键边和伪关键边)

You are given a weighted undirected graph with n nodes and edges[i] = [u, v, w]. Return a list of two lists: the indices of the cr...

View Solution→
NeetCode #653LC-815Advanced Graphs
Hard

Bus Routes (公交路线)

You are given routes where routes[i] is the list of stops of bus route i, plus source and target. You start at source and may ride...

View Solution→
NeetCode #654LC-2392Advanced GraphsNC 250
Hard

Build a Matrix With Conditions (给定条件下构造矩阵)

You are given a positive integer k, rowConditions where rowConditions[i] = [above, below] means the value above must be in a row s...

View Solution→
NeetCode #655LC-2709Advanced GraphsNC 250
Hard

Greatest Common Divisor Traversal (最大公约数遍历)

You are given a 0-indexed array nums. You may traverse from index i to index j if gcd(nums[i], nums[j]) > 1. Return whether the...

View Solution→
NeetCode #656LC-2493Advanced Graphs
Hard

Divide Nodes Into the Maximum Number of Groups (将节点分成尽可能多的组)

You are given an undirected graph of n nodes and edges. Divide the nodes into the maximum number of groups such that: every edge c...

View Solution→
NeetCode #657LC-701-D Dynamic ProgrammingBlind 75NC 150NC 250
Easy

Climbing Stairs (爬楼梯)

You are climbing a staircase with n steps. Each move you may climb either 1 or 2 steps. Return the number of distinct ways to reac...

View Solution→
NeetCode #658LC-7461-D Dynamic ProgrammingNC 150NC 250
Easy

Min Cost Climbing Stairs (使用最小花费爬楼梯)

You are given an integer array cost where cost[i] is the price of stepping on stair i. Once you pay, you may climb one or two step...

View Solution→
NeetCode #659LC-11371-D Dynamic ProgrammingNC 250
Easy

N-th Tribonacci Number (第 N 个泰波那契数)

The Tribonacci sequence is defined by T0 = 0, T1 = 1, T2 = 1, and Tn = Tn-1 + Tn-2 + Tn-3 for n >= 3. Given n, return Tn. Const...

View Solution→
NeetCode #660LC-1981-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

House Robber (打家劫舍)

You are given a non-negative integer array nums where nums[i] is the money in house i. Return the maximum amount you can rob witho...

View Solution→
NeetCode #661LC-2131-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

House Robber II (打家劫舍 II)

The houses are now arranged in a circle, so the first and last houses are adjacent. Given nums, return the maximum amount you can ...

View Solution→
NeetCode #662LC-2561-D Dynamic ProgrammingNC Algo100
Medium

Paint House (粉刷房子)

You are given an n x 3 matrix costs where costs[i][j] is the cost of painting house i with colour j (colours 0, 1, 2). Paint every...

View Solution→
NeetCode #663LC-2761-D Dynamic ProgrammingNC Algo100
Medium

Paint Fence (栅栏涂色)

There are n fence posts and k colours. Paint the posts so that no more than two adjacent posts share the same colour. Return the n...

View Solution→
NeetCode #664LC-6511-D Dynamic ProgrammingNC Algo100
Medium

4 Keys Keyboard (4 键键盘)

Imagine a keyboard with four keys: A (print one letter A), Ctrl-A (select all), Ctrl-C (copy the selection), and Ctrl-V (paste the...

View Solution→
NeetCode #665LC-12591-D Dynamic ProgrammingNC Algo100
Hard

Handshakes That Don't Cross (不相交的握手)

numPeople people stand in a circle and each shakes exactly one other person's hand, with no two handshakes crossing. Return the nu...

View Solution→
NeetCode #666LC-51-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Longest Palindromic Substring (最长回文子串)

Given a string s, return the longest palindromic substring in s. A palindrome reads the same forwards and backwards. Constraints: ...

View Solution→
NeetCode #667LC-6471-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Palindromic Substrings (回文子串)

Given a string s, return the number of palindromic substrings in it. Substrings with different start or end indices are counted se...

View Solution→
NeetCode #668LC-911-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Decode Ways (解码方法)

A message of digits can be decoded where A through Z map to the digit strings 1 through 26. Given a digit string s, return the num...

View Solution→
NeetCode #669LC-3221-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Coin Change (零钱兑换)

You are given an integer array coins of distinct denominations and an integer amount. You have an unlimited supply of each coin. R...

View Solution→
NeetCode #670LC-1521-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Maximum Product Subarray (乘积最大子数组)

Given an integer array nums, find a contiguous subarray with the largest product and return that product. Constraints: 1 <= num...

View Solution→
NeetCode #671LC-1391-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Word Break (单词拆分)

Given a string s and a dictionary wordDict, return whether s can be segmented into a space-separated sequence of one or more dicti...

View Solution→
NeetCode #672LC-3001-D Dynamic ProgrammingBlind 75NC 150NC 250
Medium

Longest Increasing Subsequence (最长递增子序列)

Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence keeps the original or...

View Solution→