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 16a767d commit 384d849Copy full SHA for 384d849
two-sum/GUMUNYEONG.js
@@ -17,7 +17,7 @@ var twoSum = function (nums, target) {
17
let list = [];
18
const reverseKey = numPair[key];
19
20
- if (numPair[reverseKey] && parseInt(key) === numPair[reverseKey]) {
+ if (parseInt(key) === numPair[reverseKey]) {
21
let firstNum;
22
let secNum;
23
@@ -46,3 +46,4 @@ var twoSum = function (nums, target) {
46
47
// SC : O(n)
48
// 크기가 n만큼인 객체(numPair)를 생성하므로 공간 복잡도도 O(n)
49
+
0 commit comments