🚀 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 #145LC-2870Arrays & Hashing
Medium

Minimum Number of Operations to Make Array Empty (使数组为空的最少操作次数)

You are given an array nums of positive integers. In one operation, remove either two equal elements or three equal elements. Retu...

View Solution→
NeetCode #146LC-2966Arrays & Hashing
Medium

Divide Array Into Arrays With Max Difference (划分数组并满足最大差限制)

Given an integer array nums and an integer k, divide nums into arrays of exactly 3 elements such that the difference between any t...

View Solution→
NeetCode #147LC-1291Arrays & Hashing
Medium

Sequential Digits (顺次数)

An integer has sequential digits if each digit is exactly one more than the previous. Given low and high, return a sorted list of ...

View Solution→
NeetCode #148LC-451Arrays & Hashing
Medium

Sort Characters By Frequency (根据字符出现频率排序)

Given a string s, sort it in decreasing order of character frequency. Constraints: 1 <= s.length <= 5 * 10^5; s consists of ...

View Solution→
NeetCode #149LC-2191Arrays & Hashing
Medium

Sort the Jumbled Numbers (将杂乱数组排序)

You are given a 0-indexed integer array nums and an array mapping of 10 digits. The mapped value of a number is obtained by replac...

View Solution→
NeetCode #150LC-2971Arrays & Hashing
Medium

Find Polygon With the Largest Perimeter (找到最大周长的多边形)

Given an array nums of positive integers, return the largest perimeter of a polygon with at least 3 sides that can be formed from ...

View Solution→
NeetCode #151LC-1249Arrays & Hashing
Medium

Minimum Remove to Make Valid Parentheses (移除无效的括号)

Given a string s of '(', ')' and lowercase letters, remove the minimum number of parentheses so that the resulting string is valid...

View Solution→
NeetCode #152LC-525Arrays & Hashing
Medium

Contiguous Array (连续数组)

Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0s and 1s. Constraints: 1 &l...

View Solution→
NeetCode #153LC-2364Arrays & Hashing
Medium

Count Number of Bad Pairs (统计坏数对的数目)

You are given a 0-indexed integer array nums. A pair (i, j) is bad if i < j and j - i != nums[j] - nums[i]. Return the total nu...

View Solution→
NeetCode #154LC-442Arrays & Hashing
Medium

Find All Duplicates in an Array (数组中重复的数据)

Given an integer array nums of length n where every element is in [1, n] and each element appears once or twice, return all elemen...

View Solution→
NeetCode #155LC-3043Arrays & Hashing
Medium

Find the Length of the Longest Common Prefix (最长公共前缀的长度)

You are given two arrays of positive integers arr1 and arr2. For each pair of integers, consider their decimal string representati...

View Solution→
NeetCode #156LC-2257Arrays & Hashing
Medium

Count Unguarded Cells in the Grid (统计网格图中没有被保卫的格子数)

You are given two integers m and n and a 2D grid where 0 is an empty cell, 1 is a guard and 2 is a wall. A guard sees every cell i...

View Solution→
NeetCode #157LC-362Arrays & Hashing
Medium

Design Hit Counter (敲击计数器)

Design a hit counter that counts hits in the past 5 minutes (300 seconds). Implement hit(timestamp) and getHits(timestamp). Timest...

View Solution→
NeetCode #158LC-244Arrays & Hashing
Medium

Shortest Word Distance II (最短单词距离 II)

Design a class that is initialised with an array of strings wordsDict and answers repeated queries shortest(word1, word2) returnin...

View Solution→
NeetCode #159LC-1570Arrays & Hashing
Medium

Dot Product of Two Sparse Vectors (两个稀疏向量的点积)

Design a class that computes the dot product of two sparse vectors. The constructor takes nums, and dotProduct(vec) returns the do...

View Solution→
NeetCode #160LC-2021Arrays & Hashing
Medium

Brightest Position on Street (街上最亮的位置)

There is a street with positions on a number line. Each lights[i] = [position, range] describes a lamp that illuminates the closed...

View Solution→
NeetCode #161LC-3481Arrays & Hashing
Medium

Apply Substitutions (应用替换)

You are given replacements, a list of [key, value] pairs where each key is a single uppercase letter and the value may contain pla...

View Solution→
NeetCode #162LC-1101Arrays & Hashing
Medium

The Earliest Moment When Everyone Become Friends (彼此熟识的最早时间)

There are n people in a social network. Given logs where logs[i] = [timestamp, idA, idB] means the two people became friends at th...

View Solution→
NeetCode #163LC-308Arrays & Hashing
Medium

Range Sum Query 2D - Mutable (二维区域和检索 - 可变)

Design a class supporting update(row, col, val) and sumRegion(row1, col1, row2, col2) on a 2D matrix. Constraints: 1 <= m, n &l...

View Solution→
NeetCode #164LC-1258Arrays & Hashing
Medium

Synonymous Sentences (近义词句子)

Given a list of synonym pairs and a sentence text, generate all possible sentences by replacing words with their synonyms. Return ...

View Solution→
NeetCode #165LC-555Arrays & Hashing
Medium

Split Concatenated Strings (分割连接字符串)

Given a list of strings strs, concatenate them in order and then cut the result at some position to form a single loop, which can ...

View Solution→
NeetCode #166LC-379Arrays & Hashing
Medium

Design Phone Directory (电话目录)

Design a phone directory that assigns numbers in the range [0, maxNumbers - 1]. Implement get() returning an available number (or ...

View Solution→
NeetCode #167LC-635Arrays & Hashing
Medium

Design Log Storage System (设计日志存储系统)

Design a log storage system. put(id, timestamp) stores a log with a timestamp formatted as "Year:Month:Day:Hour:Minute:Second". re...

View Solution→
NeetCode #168LC-68Arrays & Hashing
Hard

Text Justification (文本左右对齐)

Given an array of words and a width maxWidth, format the text so that each line has exactly maxWidth characters and is fully justi...

View Solution→