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 151f5c1 commit 5d7cff7Copy full SHA for 5d7cff7
two-sum/ymir0916.java
@@ -3,6 +3,8 @@
3
4
class Solution {
5
public int[] twoSum(int[] nums, int target) {
6
+ // 시간 복잡도를 생각해서 HashMap을 사용
7
+
8
Map<Integer, Integer> idx = new HashMap<>();
9
for (int i = 0; i < nums.length; i++) {
10
int c = target - nums[i];
0 commit comments