Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ delete
Method
delete
src/class129/Code04_FindNear.java:109–118 ·
view source on GitHub ↗
(int i)
Source
from the content-addressed store, hash-verified
107
108
// 双向链表中删掉i位置
109
public
static
void
delete(
int
i) {
110
int
l = last[i];
111
int
r = next[i];
112
if
(l != 0) {
113
next[l] = r;
114
}
115
if
(r != 0) {
116
last[r] = l;
117
}
118
}
119
120
// 随机生成arr[1...n]确保没有重复数值
121
// 为了测试
Callers
1
near2
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected