refactor: convert all LeetCode solutions to Go-only
Changes: - Removed all Java code implementations - Kept only Go language solutions - Renamed "## Go 解法" to "## 解法" - Removed "### Go 代码要点" sections - Cleaned up duplicate headers and empty sections - Streamlined documentation for better readability Updated files (9): - 三数之和.md - 两数相加.md - 无重复字符的最长子串.md - 最长回文子串.md - 括号生成.md - 子集.md - 单词搜索.md - 电话号码的字母组合.md - 柱状图中最大的矩形.md All 22 LeetCode Hot 100 Medium problems now use Go exclusively. Code is cleaner, more focused, and easier to follow. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -46,7 +46,7 @@ LeetCode 3. Medium
|
||||
|
||||
---
|
||||
|
||||
## Go 解法
|
||||
## 解法
|
||||
|
||||
```go
|
||||
func lengthOfLongestSubstring(s string) int {
|
||||
@@ -74,16 +74,8 @@ func lengthOfLongestSubstring(s string) int {
|
||||
}
|
||||
```
|
||||
|
||||
### Go 代码要点
|
||||
1. 使用 `range` 遍历字符串,自动处理 Unicode
|
||||
2. `map[rune]int` 记录字符索引
|
||||
3. 条件判断:`idx >= left` 确保在窗口内
|
||||
|
||||
---
|
||||
|
||||
## 解法
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 图解过程
|
||||
|
||||
Reference in New Issue
Block a user