leetcode-rust package require rustc_private feature to enable rustc relative API
e.g. use rustc_span::lev_distance::lev_distance(&a, &b) one line to solve leetcode edit-distance (Unfortunately we can't use nightly and rustc-dev in leetcode)
- rustc_span::lev_distance::lev_distance solve leetcode edit distance
- rustc_lexer::tokenize solve leetcode Basic Calculator II
| Problem | Solution |
|---|---|
| 1A - Theatre Square | Rust |
| 4A - Watermelon | Rust |
| 71A - Way Too Long Words | Rust |
| 158A - Next Round | Rust |
| 231A - Team | Rust |
(problem number with 🔒 suffix need leetcode VIP to unlock)
| # | Title | Solutions | Category |
|---|---|---|---|
| LCP.7 | 传递信息Rust | ||
| 59 | 队列的最大值 | Python | |
| 60 | n个骰子的点数 | Python | |
| 61 | 扑克牌中的顺子 | Python | |
| 62 | 圆圈中最后剩下的数字 | Python | 约瑟夫环 |
todo_dp:
- 划分型动态规划:戳气球、石子归并(dp/stone_game_merge.py)
- 选或不选类DP: 打家劫舍系列/股票买卖系列
- 计数型动态规划: k sum
- 43/415 字符串整数相乘/相加
- 415是经典面试题利用字符串模拟竖式加法进行大数相加
- 有兴趣但是困难级别的题: 1. 推箱子 2. 华容道
- [ ]最大直方图矩阵(Longest Histogram Rectangle), 单调栈O(n^3)->O(n)
