C LeetCode刷題 雙指標

2021-08-28 21:12:26 字數 2621 閱讀 2479

雙指標篇

#題名刷題通過率難度

3無重複字元的最長子串

24.5%

中等11

盛最多水的容器

43.5%

中等15

三數之和

16.1%

中等16

最接近的三數之和

34.6%

中等18

四數之和

29.8%

中等19

刪除鍊錶的倒數第n個節點

29.6%

中等26

刪除排序陣列中的重複項

c#leetcode刷題之#26-刪除排序陣列中的重複項(remove duplicates from sorted array)

39.8%

簡單27

移除元素

c#leetcode刷題之#27-移除元素(remove element)

50.0%

簡單28

實現strstr()

c#leetcode刷題之#28-實現strstr()(implement strstr())

35.9%

簡單30

與所有單詞相關聯的字串

20.2%

困難42

35.7%

困難61

旋轉鍊錶

34.2%

中等75

顏色分類

48.3%

中等76

最小覆蓋子串

29.4%

困難80

刪除排序陣列中的重複項 ii

42.5%

中等86

分隔鍊錶

41.0%

中等88

合併兩個有序陣列

c#leetcode刷題之#88-合併兩個有序陣列(merge sorted array)

38.9%

簡單125

驗證回文串

c#leetcode刷題之#125-驗證回文串(valid palindrome)

35.1%

簡單141

環形鍊錶

c#leetcode刷題之#141-環形鍊錶(linked list cycle)

29.6%

簡單142

環形鍊錶 ii

27.1%

中等167

兩數之和 ii - 輸入有序陣列

c#leetcode刷題之#167-兩數之和 ii - 輸入有序陣列(two sum ii - input array is sorted)

41.4%

簡單209

長度最小的子陣列

33.7%

中等234

回文鍊錶

c#leetcode刷題之#234-回文鍊錶(palindrome linked list)

32.8%

簡單283

移動零

c#leetcode刷題之#283-移動零(move zeroes)

51.0%

簡單287

尋找重複數

53.5%

中等344

反轉字串

c#leetcode刷題之#344-反轉字串(reverse string)

62.9%

簡單345

反轉字串中的母音字母

42.3%

簡單349

兩個陣列的交集

c#leetcode刷題之#349-兩個陣列的交集(intersection of two arrays)

53.0%

簡單350

兩個陣列的交集 ii

c#leetcode刷題之#350-兩個陣列的交集 ii(intersection of two arrays ii)

34.6%

簡單524

通過刪除字母匹配到字典裡最長單詞

34.0%

中等532

陣列中的k-diff數對

c#leetcode刷題之#532-陣列中的k-diff數對(k-diff pairs in an array)

26.3%

簡單567

字串的排列

26.9%

中等632

最小區間

34.8%

困難713

乘積小於k的子陣列

24.4%

中等763

劃分字母區間

60.6%

中等826

安排工作以達到最大收益

24.4%

中等828

獨特字串

21.9%

困難844

比較含退格的字串

c#leetcode刷題之#844-比較含退格的字串​​​​​​​(backspace string compare)

42.4%

簡單845

陣列中的最長山脈

24.6%

中等881

救生艇

28.3%

中等904

水果成籃

22.0%

中等

C LeetCode刷題 排序

排序篇 題名刷題通過率難度 56合併區間 31.2 中等57 插入區間 30.4 困難75 顏色分類 48.6 中等147 對鍊錶進行插入排序 50.7 中等148 排序鍊錶 52.7 中等164 最大間距 43.0 困難179 最大數 26.7 中等242 有效的字母異位詞 c leetcode刷...

C LeetCode刷題 設計

設計篇 題名刷題 通過率難度 146lru快取機制 33.1 困難155 最小棧 c leetcode刷題之 155 最小棧 min stack 44.9 簡單173 二叉搜尋樹迭代器 49.2 中等208 實現 trie 字首樹 48.5 中等211 新增與搜尋單詞 資料結構設計 40.0 中等2...

leetcode刷題 雙指標

使用雙指標,乙個指向最左邊,乙個指向最右邊,判斷與目標target的大小關係 public int twosum int numbers,int target else if numbers l numbers r else return newint 0 題目 給定乙個非負整數 c 你要判斷是否存...