mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-19 03:55:50 +08:00
1. Add C++ codes for the chapter of
computational complexity, sorting, searching. 2. Corrected some mistakes. 3. Update README.
This commit is contained in:
@ -48,10 +48,10 @@ public class leetcode_two_sum {
|
||||
// 方法一
|
||||
SolutionBruteForce slt1 = new SolutionBruteForce();
|
||||
int[] res = slt1.twoSum(nums, target);
|
||||
System.out.println(Arrays.toString(res));
|
||||
System.out.println("方法一 res = " + Arrays.toString(res));
|
||||
// 方法二
|
||||
SolutionHashMap slt2 = new SolutionHashMap();
|
||||
res = slt2.twoSum(nums, target);
|
||||
System.out.println(Arrays.toString(res));
|
||||
System.out.println("方法二 res = " + Arrays.toString(res));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user