Skip to content

Commit 5d7cff7

Browse files
committed
"op K Frequent Elements 문제"
1 parent 151f5c1 commit 5d7cff7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

two-sum/ymir0916.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
class Solution {
55
public int[] twoSum(int[] nums, int target) {
6+
// 시간 복잡도를 생각해서 HashMap을 사용
7+
68
Map<Integer, Integer> idx = new HashMap<>();
79
for (int i = 0; i < nums.length; i++) {
810
int c = target - nums[i];

0 commit comments

Comments
 (0)