🚀 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 #25LC-723Arrays & HashingNC Algo100
Medium

Candy Crush (粉碎糖果)

Implement Candy Crush on an m x n board of integers (1-3 for candy types, 0 for empty). Repeatedly: (1) mark all candies that are ...

View Solution→
NeetCode #26LC-1198Arrays & HashingNC Algo100
Medium

Find Smallest Common Element in All Rows (找出所有行中最小的公共元素)

Given an m x n matrix mat where every row is sorted in strictly increasing order, return the smallest common element in all rows. ...

View Solution→
NeetCode #27LC-161Arrays & HashingNC Algo100
Medium

One Edit Distance (相隔为 1 的编辑距离)

Given two strings s and t, determine whether they are exactly one edit distance apart. A valid edit is inserting one character, de...

View Solution→
NeetCode #28LC-186Arrays & HashingNC Algo100
Medium

Reverse Words in a String II (翻转字符串里的单词 II)

Given a character array s containing a sequence of words separated by single spaces, reverse the order of the words in place. A wo...

View Solution→
NeetCode #29LC-1055Arrays & HashingNC Algo100
Medium

Shortest Way to Form String (形成字符串的最短路径)

Given a string source and a string target, return the minimum number of subsequences of source whose concatenation equals target. ...

View Solution→
NeetCode #30LC-1429Arrays & HashingNC Algo100
Medium

First Unique Number (第一个唯一数字)

Design a class that supports adding numbers to a stream and returning the first unique (non-repeating) number. Implement showFirst...

View Solution→
NeetCode #31LC-348Arrays & HashingNC Algo100
Medium

Design Tic-Tac-Toe (设计井字棋)

Design a Tic-Tac-Toe game on an n x n board. Implement move(row, col, player) which records the move and returns the winning playe...

View Solution→
NeetCode #32LC-353Arrays & HashingNC Algo100
Medium

Design Snake Game (贪吃蛇游戏)

Design a Snake game on a width x height grid. The snake starts at (0, 0) with length 1. Food positions are given in advance. Imple...

View Solution→
NeetCode #33LC-281Arrays & HashingNC Algo100
Medium

Zigzag Iterator (锯齿迭代器)

Given two vectors v1 and v2, implement an iterator that returns their elements in alternating order, starting with v1. If one vect...

View Solution→
NeetCode #34LC-1244Arrays & HashingNC Algo100
Medium

Design A Leaderboard (力扣排行榜)

Design a leaderboard with addScore(playerId, score), top(K) returning the sum of the top K scores, and reset(playerId) setting tha...

View Solution→
NeetCode #35LC-2678Arrays & Hashing
Easy

Number of Senior Citizens (老人的数目)

Given an array details of passenger information strings, each formatted as "<phone number><gender><age><seat&...

View Solution→
NeetCode #36LC-1Arrays & HashingBlind 75NC 150NC 250
Easy

Two Sum (两数之和)

Given an array of integers nums and an integer target, return the indices [i, j] such that nums[i] + nums[j] == target, with i != ...

View Solution→
NeetCode #37LC-485Arrays & Hashing
Easy

Max Consecutive Ones (最大连续 1 的个数)

Given a binary array nums, return the maximum number of consecutive 1s in the array. Constraints: 1 <= nums.length <= 10^5, ...

View Solution→
NeetCode #38LC-14Arrays & HashingNC 250
Easy

Longest Common Prefix (最长公共前缀)

Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return the em...

View Solution→
NeetCode #39LC-1408Arrays & Hashing
Easy

String Matching in an Array (数组中的字符串匹配)

Given an array of strings words, return all strings that are a substring of another string in the array, in any order. Constraints...

View Solution→
NeetCode #40LC-49Arrays & HashingBlind 75NC 150NC 250
Medium

Group Anagrams (字母异位词分组)

Given an array of strings strs, group the anagrams together. Return the groups in any order. Constraints: 1 <= strs.length <...

View Solution→
NeetCode #41LC-118Arrays & Hashing
Easy

Pascal's Triangle (杨辉三角)

Given an integer numRows, return the first numRows rows of Pascal's triangle. In Pascal's triangle, each number is the sum of the ...

View Solution→
NeetCode #42LC-27Arrays & HashingNC 250
Easy

Remove Element (移除元素)

Given an integer array nums and an integer val, remove all occurrences of val in place. The order of the remaining elements may ch...

View Solution→
NeetCode #43LC-929Arrays & Hashing
Easy

Unique Email Addresses (独特的电子邮件地址)

Every valid email address consists of a local name, an @, and a domain name. In the local name, periods are ignored and everything...

View Solution→
NeetCode #44LC-205Arrays & Hashing
Easy

Isomorphic Strings (同构字符串)

Given two strings s and t, determine if they are isomorphic: every character of s can be replaced to get t, with a consistent one-...

View Solution→
NeetCode #45LC-605Arrays & Hashing
Easy

Can Place Flowers (种花问题)

You have a long flowerbed in which some plots are planted and some are not, given as a binary array flowerbed. Flowers cannot be p...

View Solution→
NeetCode #46LC-169Arrays & HashingNC 250
Easy

Majority Element (多数元素)

Given an array nums of size n, return the majority element -- the element that appears more than n / 2 times. You may assume the m...

View Solution→
NeetCode #47LC-3442Arrays & Hashing
Easy

Maximum Difference Between Even and Odd Frequency I (奇偶频次间的最大差值 I)

Given a string s, find the maximum difference between the frequency of a character appearing an even number of times and the frequ...

View Solution→
NeetCode #48LC-496Arrays & Hashing
Easy

Next Greater Element I (下一个更大元素 I)

You are given two arrays nums1 and nums2 where nums1 is a subset of nums2. For each element of nums1, find the first element to it...

View Solution→