---
# System prepended metadata

title: leetcode
tags: [家教]

---

## 初學程式的解題流程
<!-- YUZH -->
### 熟悉 array 與 dict
- [x] [1512. Number of Good Pairs](https://leetcode.com/problems/number-of-good-pairs/description/)
- [x] [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/?envType=study-plan-v2&envId=top-interview-150)
- [x] [290. Word Pattern](https://leetcode.com/problems/word-pattern/description/?envType=study-plan-v2&envId=top-interview-150)
- [x] [1672. Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/description/)
- [x] [217. contains duplicate](https://leetcode.com/problems/contains-duplicate/description/)
- [x] [242. valid anagram](https://leetcode.com/problems/valid-anagram/)
- [x] [1. two sum](https://leetcode.com/problems/two-sum/description/)
- [x] [242. Valid Anagram](https://leetcode.com/problems/summary-ranges/description/?envType=study-plan-v2&envId=top-interview-150)
- [x] [1480. running sum of 1d array](https://leetcode.com/problems/running-sum-of-1d-array/)

### 2-pointer
- [x] [147 two sum in sorted array](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/)
    - [不會的話看這個解析](https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/solutions/3933451/two-pointers-approach-easy-to-understand-in-9-languages/)
- [x] [125 valid palindrome](https://leetcode.com/problems/valid-palindrome/description/)

### stack
- [ ] [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/description/)

### recursive
- [x] [climbing stairs](https://leetcode.com/problems/climbing-stairs/)
- [x] [power of four](https://leetcode.com/problems/power-of-four/)



### DP
- [ ] [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/?envType=study-plan-v2&envId=top-interview-150)
    - [ ] [參考解法](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/?envType=study-plan-v2&envId=top-interview-150)



### 好題目
- [x] [169. Majority Element](https://leetcode.com/problems/majority-element/description/?envType=study-plan-v2&envId=top-interview-150)
    - [ ] [參考文章](https://ithelp.ithome.com.tw/articles/10213285)



## Pandas 題目

### selecting
- [x] [584. Find Customer Referee](https://leetcode.com/problems/find-customer-referee/description/?envType=study-plan-v2&envId=top-sql-50)
- [x] [1148. Article Views I](https://leetcode.com/problems/article-views-i/?envType=study-plan-v2&envId=top-sql-50)
- [x] [1757. Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/description/?envType=study-plan-v2&envId=top-sql-50)

### 進階 selecting
- [x] [620. Not Boring Movies](https://leetcode.com/problems/not-boring-movies/description/?envType=study-plan-v2&envId=top-sql-50)

## merge concat join


- [x] [175. Combine Two Tables](https://leetcode.com/problems/combine-two-tables/description/)
- [x] [183. Customers Who Never Order](https://leetcode.com/problems/customers-who-never-order/description/)
- [x] [1378. Replace Employee ID With The Unique Identifier](https://leetcode.com/problems/replace-employee-id-with-the-unique-identifier/description/?envType=study-plan-v2&envId=top-sql-50)
- [x] [1068. Product Sales Analysis I](https://leetcode.com/problems/product-sales-analysis-i/description/?envType=study-plan-v2&envId=top-sql-50)

### group by

- [x] [2356. Number of Unique Subjects Taught by Each Teacher](https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/?envType=study-plan-v2&envId=top-sql-50)
- [x] [1141. User Activity for the Past 30 Days I](https://leetcode.com/problems/user-activity-for-the-past-30-days-i/description/?envType=study-plan-v2&envId=top-sql-50)
    - 這一題要嘗試使用 pandas 中的 between，還有 datetime 
    - [參考連結](https://pandas.pydata.org/docs/reference/api/pandas.Series.between.html)
- [x] [596. Classes More Than 5 Students](https://leetcode.com/problems/classes-more-than-5-students/description/?envType=study-plan-v2&envId=top-sql-50)