fix: remove remaining Java implementation sections

- Remove all "### Java 实现" sections from all markdown files
- Clean up remaining Java code blocks and references
- Ensure only Go code remains in all documentation
- Complete the Java to Go migration for all 22 files
This commit is contained in:
2026-03-05 12:32:09 +08:00
parent 15dbd75004
commit 58b7491868
7 changed files with 0 additions and 70 deletions

View File

@@ -95,23 +95,6 @@ func exist(board [][]byte, word string) bool {
}
```
### Java 实现
## 复杂度分析
- **时间复杂度:** O(m × n × 4^L)
- m × n 是网格大小
- L 是单词长度
- 最坏情况每个位置都要搜索 4 个方向
- **空间复杂度:** O(L)
- 递归栈深度最大为 L
- visited 数组 O(m × n)
## P7 加分项
### 变形题目:单词搜索 II
**LeetCode 212:** 给定一个 m x n 二维字符网格 board 和一个单词列表 words返回所有在二维网格和字典中出现的单词。

View File

@@ -114,10 +114,6 @@ func main() {
}
```
### Java 实现(回溯法)
### Go 实现(迭代法-位掩码)
```go
func subsetsBitMask(nums []int) [][]int {
@@ -140,10 +136,6 @@ func subsetsBitMask(nums []int) [][]int {
}
```
### Java 实现(迭代法-位掩码)
### Go 实现(级联法)
```go
func subsetsCascade(nums []int) [][]int {

View File

@@ -137,10 +137,6 @@ func main() {
}
```
### Java 实现(回溯法)
### Go 实现(动态规划)
```go
func generateParenthesisDP(n int) []string {
@@ -166,12 +162,6 @@ func generateParenthesisDP(n int) []string {
}
```
### Java 实现(动态规划)
## 复杂度分析
### 回溯法
- **时间复杂度:** O(4^n / √n)
- 在回溯树中,每个节点最多有 2 个分支

View File

@@ -134,10 +134,6 @@ func main() {
}
```
### Java 实现(中心扩展法)
### Go 实现(动态规划)
```go
func longestPalindromeDP(s string) string {
@@ -179,10 +175,6 @@ func longestPalindromeDP(s string) string {
}
```
### Java 实现(动态规划)
### Go 实现Manacher 算法)
```go
func longestPalindromeManacher(s string) string {

View File

@@ -52,17 +52,6 @@ func largestRectangleArea(heights []int) int {
}
```
### Java 实现
## 复杂度分析
- **时间复杂度:** O(n)
- **空间复杂度:** O(n)
## P7 加分项
### 相关题目
- LeetCode 85: 最大矩形(二维版本)
- LeetCode 42: 接雨水

View File

@@ -151,10 +151,6 @@ func main() {
}
```
### Java 实现(回溯法)
### Go 实现(队列迭代法)
```go
func letterCombinationsIterative(digits string) []string {
@@ -195,12 +191,6 @@ func letterCombinationsIterative(digits string) []string {
}
```
### Java 实现(队列迭代法)
## 复杂度分析
### 回溯法
- **时间复杂度:** O(3^m × 4^n)
- 其中 m 是对应 3 个字母的数字个数2, 3, 4, 5, 6, 8

View File

@@ -123,12 +123,6 @@ func main() {
}
```
### Java 实现
## 复杂度分析
### 双指针法
- **时间复杂度:** O(n)
- 只需遍历数组一次,每次移动一个指针
- 指针最多移动 n 次