MCPcopy Create free account
hub / github.com/algorithmzuo/videocode / main

Method main

src/videocode/Code01_SuperWaterKing.java:124–140  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

122 // 如果verify方法和waterKing方法每次返回的结果一样
123 // 说明两个方法都正确
124 public static void main(String[] args) {
125 int maxLen = 1000;
126 int maxValue = 5;
127 int testTime = 100000;
128 System.out.println("如果没有打印错误,说明验证通过");
129 System.out.println("测试开始");
130 for (int i = 0; i < testTime; i++) {
131 int[] arr = randomArray(maxLen, maxValue);
132 int ans1 = verify(arr);
133 int ans2 = waterKing(arr);
134 if (ans1 != ans2) {
135 System.out.println(ans1);
136 System.out.println("出错了!");
137 }
138 }
139 System.out.println("测试结束");
140 }
141
142}

Callers

nothing calls this directly

Calls 3

randomArrayMethod · 0.95
verifyMethod · 0.95
waterKingMethod · 0.95

Tested by

no test coverage detected