Skip to content

Commit f088dff

Browse files
author
miaoxiaowei1112
committed
comment the 69, for generated code has dead loop
1 parent 6f30e84 commit f088dff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/java/com/aixcode/autoTest/aixcoderV2/AixcoderOld69.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ public class AixcoderOld69 extends GenerateMethodBase {
77
public int getMax(LinkedList<Integer> list) {
88
int max = list.getLast();
99
int temp = 0;
10-
while (list.size() > 1) {
11-
temp = list.get(list.size() - 2);
12-
list.remove(list.size() - 1);
13-
list.add(temp);
14-
}
10+
//dead loop
11+
// while (list.size() > 1) {
12+
// temp = list.get(list.size() - 2);
13+
// list.remove(list.size() - 1);
14+
// list.add(temp);
15+
// }
1516
return max;
1617
}
1718
}

0 commit comments

Comments
 (0)