🚀 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 #793LC-1899GreedyNC 150NC 250
Medium

Merge Triplets to Form Target Triplet (合并若干三元组以形成目标三元组)

You are given a 2D array triplets and an integer array target. In one operation pick two triplets and replace them with their elem...

View Solution→
NeetCode #794LC-763GreedyNC 150NC 250
Medium

Partition Labels (划分字母区间)

You are given a string s. Partition it into as many parts as possible so that each letter appears in at most one part, and return ...

View Solution→
NeetCode #795LC-678GreedyNC 150NC 250
Medium

Valid Parenthesis String (有效的括号字符串)

Given a string s containing only (, ) and *, where * may be treated as (, ), or the empty string, return true if s can be a valid ...

View Solution→
NeetCode #796LC-2116Greedy
Medium

Check if a Parentheses String Can Be Valid (判断一个括号字符串是否有效)

You are given a string s of ( and ), and a binary string locked where 1 means the character is locked (unchangeable) and 0 means i...

View Solution→
NeetCode #797LC-1921Greedy
Medium

Eliminate Maximum Number of Monsters (消灭怪物的最大数量)

You are given dist[i] (distance from the city) and speed[i] (speed per minute) for n monsters. Each minute you may eliminate one m...

View Solution→
NeetCode #798LC-1029Greedy
Medium

Two City Scheduling (两地调度)

A company must send 2n people to two cities, n to each. costs[i] = [costA, costB] is the cost of sending person i to city A or cit...

View Solution→
NeetCode #799LC-646Greedy
Medium

Maximum Length of Pair Chain (最长数对链)

You are given n pairs where pairs[i] = [left, right] and left < right. A pair [c, d] can follow [a, b] in a chain if b < c. ...

View Solution→
NeetCode #800LC-1014Greedy
Medium

Best Sightseeing Pair (最佳观光组合)

Given an array values, the score of a pair (i, j) with i < j is values[i] + values[j] + i - j. Return the maximum score. Constr...

View Solution→
NeetCode #801LC-2948Greedy
Medium

Make Lexicographically Smallest Array by Swapping Elements (交换得到字典序最小的数组)

Given an array nums and an integer limit, you may swap nums[i] and nums[j] any number of times if |nums[i] - nums[j]| <= limit....

View Solution→
NeetCode #802LC-1647Greedy
Medium

Minimum Deletions to Make Character Frequencies Unique (字符频次唯一的最小删除次数)

A string s is good if no two different characters have the same frequency. Return the minimum number of deletions to make s good. ...

View Solution→
NeetCode #803LC-1653Greedy
Medium

Minimum Deletions to Make String Balanced (使字符串平衡的最少删除次数)

You are given a string s of a and b. A string is balanced if no a appears after a b. In one deletion you may remove any character....

View Solution→
NeetCode #804LC-135GreedyNC 250
Hard

Candy (分发糖果)

There are n children in a line, each with a ratings[i]. Give each child at least one candy; any child with a higher rating than an...

View Solution→
NeetCode #805LC-2038Greedy
Medium

Remove Colored Pieces if Both Neighbors are the Same Color (如果相邻两个颜色均相同则删除当前颜色)

There is a row of pieces coloured A or B. Alice and Bob take turns (Alice first); a player removes one of their own pieces that ha...

View Solution→
NeetCode #806LC-1717Greedy
Medium

Maximum Score From Removing Substrings (删除子字符串的最大得分)

You are given a string s and two integers x and y. You may remove the substring ab for x points or ba for y points, any number of ...

View Solution→
NeetCode #807LC-1846Greedy
Medium

Maximum Element After Decreasing and Rearranging (减小和重新排列数组后的最大元素)

You are given an array of positive integers arr. You may rearrange the elements and decrease any element (but never increase one)....

View Solution→
NeetCode #808LC-2125Greedy
Medium

Number of Laser Beams in a Bank (银行中的激光束数量)

A bank is represented as an m x n grid of strings where bank[i] describes row i: 1 is a security device and 0 is empty. A laser be...

View Solution→
NeetCode #809LC-950Greedy
Medium

Reveal Cards In Increasing Order (按递增顺序显示卡牌)

You have a deck of distinct integers. The reveal process is: take the top card, reveal it, then (if cards remain) move the new top...

View Solution→
NeetCode #810LC-2182Greedy
Medium

Construct String With Repeat Limit (构造限制重复的字符串)

Given a string s and an integer repeatLimit, construct the lexicographically largest string from the characters of s such that no ...

View Solution→
NeetCode #811LC-1605Greedy
Medium

Find Valid Matrix Given Row and Column Sums (给定行和列的和求可行矩阵)

You are given two arrays rowSum (length m) and colSum (length n). Construct an m x n matrix of non-negative integers whose row sum...

View Solution→
NeetCode #812LC-861Greedy
Medium

Score After Flipping Matrix (翻转矩阵后的得分)

You are given an m x n binary matrix grid. A move picks any row or column and flips every value in it. The score of the matrix is ...

View Solution→
NeetCode #813LC-1072Greedy
Medium

Flip Columns For Maximum Number of Equal Rows (按列翻转得到最大值等行数)

You are given an m x n binary matrix. Choose any set of columns and flip every value in those columns. Return the maximum number o...

View Solution→
NeetCode #814LC-1975Greedy
Medium

Maximum Matrix Sum (最大方阵和)

You are given an m x n integer matrix. An operation chooses two adjacent cells (sharing a side) and multiplies both by -1. You may...

View Solution→
NeetCode #815LC-1460Greedy
Easy

Make Two Arrays Equal by Reversing Subarrays (通过翻转子数组使两个数组相等)

You are given two integer arrays target and arr of the same length. In one operation you may reverse any contiguous subarray of ar...

View Solution→
NeetCode #816LC-1574Greedy
Medium

Shortest Subarray to be Removed to Make Array Sorted (删除最短的子数组使剩余数组有序)

Given an integer array arr, you may remove one contiguous subarray so that the remaining elements are non-decreasing. Return the m...

View Solution→