Update two_sum.dart (#544)
This commit is contained in:
parent
281c0c618a
commit
d0b1bf9b1a
@ -31,7 +31,7 @@ List<int> twoSumHashTable(List<int> nums, int target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Driver Code */
|
/* Driver Code */
|
||||||
int main() {
|
void main() {
|
||||||
// ======= Test Case =======
|
// ======= Test Case =======
|
||||||
List<int> nums = [2, 7, 11, 15];
|
List<int> nums = [2, 7, 11, 15];
|
||||||
int target = 13;
|
int target = 13;
|
||||||
@ -43,5 +43,4 @@ int main() {
|
|||||||
// 方法二
|
// 方法二
|
||||||
res = twoSumHashTable(nums, target);
|
res = twoSumHashTable(nums, target);
|
||||||
print('方法二 res = $res');
|
print('方法二 res = $res');
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user