mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-12 09:32:02 +08:00
build
This commit is contained in:
@@ -33,6 +33,7 @@ comments: true
|
||||
=== "Java"
|
||||
|
||||
```java title="leetcode_two_sum.java"
|
||||
/* 方法一:暴力枚举 */
|
||||
class SolutionBruteForce {
|
||||
public int[] twoSum(int[] nums, int target) {
|
||||
int size = nums.length;
|
||||
@@ -207,6 +208,7 @@ comments: true
|
||||
=== "Java"
|
||||
|
||||
```java title="leetcode_two_sum.java"
|
||||
/* 方法二:辅助哈希表 */
|
||||
class SolutionHashMap {
|
||||
public int[] twoSum(int[] nums, int target) {
|
||||
int size = nums.length;
|
||||
|
||||
Reference in New Issue
Block a user