- 博客(5)
- 收藏
- 关注
原创 每日刷题 五月集训 第 5 天 - Two-Pointer
每日刷题 五月集训 第 5 天 - Two-Pointer165. Compare Version Numbers 165. Compare Version Numbers 题目介绍: Balanced strings are those that have an equal quantity of ‘L’ and ‘R’ characters. Given a balanced string s, split it in the maximum amount of balanced strings. Re
2022-05-05 23:58:25
321
原创 每日刷题 第 4 天 - Greedy
每日刷题 五月集训 第 4 天 - Greedy2144. Minimum Cost of Buying Candies With Discount1400. Construct K Palindrome Strings 2144. Minimum Cost of Buying Candies With Discount 题目介绍: A shop is selling candies at a discount. For every two candies sold, the shop gives a th
2022-05-04 23:52:51
372
原创 424. Longest Repeating Character Replacement
这道题的重点是: 根据当下substring在最常出现letter之外的空位数是否大于K 来slide window。 right 不断地increment 可用for loop 也可以 increment right。 (right - left + 1 是因为表示当下的长度, array idx小一位的。) class Solution { public int characterReplacement(String s, int k) { if(s.len
2022-04-14 15:11:21
243
原创 [DP] 467. Unique Substrings in Wraparound String
DP问题 467 寻找unique substring的数量 (从长度为26的strings中)
2022-04-13 05:59:47
290
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅