2025 年 1 月

[Leetcode] 0076. Minimum Window Substring

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string “”.

The testcases will be generated such that the answer is unique.

[Leetcode] 0076. Minimum Window Substring Read More »

Leetcode, 技術文章

[Leetcode] 0424. Longest Repeating Character Replacement

You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times.

Return the length of the longest substring containing the same letter you can get after performing the above operations.

[Leetcode] 0424. Longest Repeating Character Replacement Read More »

Leetcode, 技術文章

[Leetcode] 0885. Spiral Matrix III

You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and column in the grid, and the southeast corner is at the last row and column.

You will walk in a clockwise spiral shape to visit every position in this grid. Whenever you move outside the grid’s boundary, we continue our walk outside the grid (but may return to the grid boundary later.). Eventually, we reach all rows * cols spaces of the grid.

Return an array of coordinates representing the positions of the grid in the order you visited them.

[Leetcode] 0885. Spiral Matrix III Read More »

Leetcode, 技術文章
zh_TW繁體中文