Skip to content

Commit 6fd957a

Browse files
committed
style: add braces
1 parent 9572046 commit 6fd957a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Sprint-1/JavaScript/findCommonItems/findCommonItems.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export const findCommonItems = (firstArray, secondArray) => {
1818

1919
for (const item of firstArray) {
2020
//O(N)
21-
if (secondSet.has(item))
22-
//O(1) on Ave
23-
commonSet.add(item); //O(1) On Ave
21+
if (secondSet.has(item)) {
22+
commonSet.add(item);
23+
}
2424
}
25-
25+
2626
return [...commonSet]; //O(K)
2727
};
2828
// Time Complexity: O(n + m)

0 commit comments

Comments
 (0)