We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f30e84 commit f088dffCopy full SHA for f088dff
src/main/java/com/aixcode/autoTest/aixcoderV2/AixcoderOld69.java
@@ -7,11 +7,12 @@ public class AixcoderOld69 extends GenerateMethodBase {
7
public int getMax(LinkedList<Integer> list) {
8
int max = list.getLast();
9
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
- }
+ //dead loop
+// while (list.size() > 1) {
+// temp = list.get(list.size() - 2);
+// list.remove(list.size() - 1);
+// list.add(temp);
15
+// }
16
return max;
17
}
18
0 commit comments