Skip to content

Commit

Permalink
feat: sort 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JEONGHWANMIN committed Aug 18, 2024
1 parent 400b4d6 commit 81e202d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kth-smallest-element-in-a-bst/hwanminini.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ var kthSmallest = function(root, k) {

dfs(root)

results.sort((a,b) => a - b)

return results[k-1]
};

0 comments on commit 81e202d

Please sign in to comment.