🚀 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 #241LC-1208Sliding Window
Medium

Get Equal Substrings Within Budget (尽可能使字符串相等)

You are given two strings s and t of the same length, and an integer maxCost. Changing s[i] to t[i] costs |s[i] - t[i]|. Return th...

View Solution→
NeetCode #242LC-1358Sliding Window
Medium

Number of Substrings Containing All Three Characters (包含所有三种字符的子字符串数目)

Given a string s consisting only of the characters a, b and c, return the number of substrings containing at least one occurrence ...

View Solution→
NeetCode #243LC-930Sliding Window
Medium

Binary Subarrays With Sum (和相同的二元子数组)

Given a binary array nums and an integer goal, return the number of non-empty subarrays with a sum equal to goal. Constraints: 1 &...

View Solution→
NeetCode #244LC-1248Sliding Window
Medium

Count Number of Nice Subarrays (统计「优美子数组」数目)

Given an array of integers nums and an integer k, return the number of nice subarrays: contiguous subarrays with exactly k odd num...

View Solution→
NeetCode #245LC-713Sliding Window
Medium

Subarray Product Less Than K (乘积小于 K 的子数组)

Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all elements is s...

View Solution→
NeetCode #246LC-1004Sliding Window
Medium

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

Given a binary array nums and an integer k, return the maximum number of consecutive 1s obtainable if you can flip at most k zeros...

View Solution→
NeetCode #247LC-3254Sliding Window
Medium

Find the Power of K-Size Subarrays I (长度为 K 的子数组的能量值 I)

You are given an array nums of n integers and an integer k. For each subarray of size k, it is powerful if its elements can be rea...

View Solution→
NeetCode #248LC-2461Sliding Window
Medium

Maximum Sum of Distinct Subarrays With Length K (长度为 K 子数组中的最大和)

You are given an integer array nums and an integer k. Find the maximum subarray sum for a subarray of length k where all elements ...

View Solution→
NeetCode #249LC-2958Sliding Window
Medium

Length of Longest Subarray With at Most K Frequency (最多 K 个重复元素的最长子数组)

Given an array of integers nums and an integer k, return the length of the longest subarray where the frequency of each element is...

View Solution→
NeetCode #250LC-2962Sliding Window
Medium

Count Subarrays Where Max Element Appears at Least K Times (统计最大元素出现至少 K 次的子数组)

You are given an integer array nums and a positive integer k. Return the number of subarrays in which the maximum element of nums ...

View Solution→
NeetCode #251LC-2779Sliding Window
Medium

Maximum Beauty of an Array After Applying Operation (数组的最大美丽值)

You are given a 0-indexed integer array nums and a non-negative integer k. In one operation you may choose an index and replace nu...

View Solution→
NeetCode #252LC-2516Sliding Window
Medium

Take K of Each Character From Left and Right (每种字符至少取 K 个)

You are given a string s consisting of the characters a, b and c, and a non-negative integer k. Each minute you may take one chara...

View Solution→
NeetCode #253LC-3306Sliding Window
Medium

Count of Substrings Containing Every Vowel and K Consonants II (元音辅音字符串计数 II)

You are given a string word and a non-negative integer k. Return the number of substrings that contain every vowel (a, e, i, o, u)...

View Solution→
NeetCode #254LC-76Sliding WindowBlind 75NC 150NC 250
Hard

Minimum Window Substring (最小覆盖子串)

Given two strings s and t, return the minimum window substring of s that contains every character of t (with multiplicity). If no ...

View Solution→
NeetCode #255LC-239Sliding WindowNC 150NC 250
Hard

Sliding Window Maximum (滑动窗口最大值)

You are given an array nums and a window size k. A sliding window of size k moves from the left to the right of the array. Return ...

View Solution→
NeetCode #256LC-992Sliding Window
Hard

Subarrays with K Different Integers (K 个不同整数的子数组)

Given an integer array nums and an integer k, return the number of good subarrays: contiguous subarrays with exactly k different i...

View Solution→
NeetCode #257LC-2009Sliding Window
Hard

Minimum Number of Operations to Make Array Continuous (使数组连续的最少操作数)

Given an integer array nums, you may increment or decrement elements arbitrarily. The array is continuous if all elements are dist...

View Solution→
NeetCode #258LC-1438Sliding Window
Medium

Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit (绝对差不超过限制的最长连续子数组)

Given an array of integers nums and an integer limit, return the size of the longest subarray such that the absolute difference be...

View Solution→
NeetCode #259LC-632Sliding Window
Hard

Smallest Range Covering Elements from K Lists (最小区间)

You are given k sorted lists of integers in nums. Find the smallest range [a, b] such that at least one number from each list lies...

View Solution→
NeetCode #260LC-704Binary SearchNC 150NC 250
Easy

Binary Search (二分查找)

Given a sorted array of integers nums and an integer target, return the index of target if it exists, otherwise -1. Constraints: 1...

View Solution→
NeetCode #261LC-35Binary SearchNC 250
Easy

Search Insert Position (搜索插入位置)

Given a sorted array of distinct integers nums and a target, return the index where the target is, or where it should be inserted ...

View Solution→
NeetCode #262LC-374Binary SearchNC 250
Easy

Guess Number Higher or Lower (猜数字大小)

This is an interactive problem. A number is picked from 1 to n. You call guess(num) which returns -1 if your guess is higher, 1 if...

View Solution→
NeetCode #263LC-441Binary Search
Easy

Arranging Coins (排列硬币)

You have n coins and want to build a staircase where the i-th row has exactly i coins. Return the number of complete rows. Constra...

View Solution→
NeetCode #264LC-367Binary Search
Easy

Valid Perfect Square (有效的完全平方数)

Given a positive integer num, return true if it is a perfect square, i.e. it equals k * k for some integer k. You must not use any...

View Solution→