Skip to content

Commit

Permalink
fix(missing-number): sort() tc is O(nlogn)
Browse files Browse the repository at this point in the history
  • Loading branch information
choidabom committed Jan 4, 2025
1 parent 6db16e3 commit c9695a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions missing-number/choidabom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* μ ‘κ·Ό
* μ§κ΄€μ μœΌλ‘œ μƒκ°ν–ˆμ„ λ•Œ, 0λΆ€ν„° nκΉŒμ§€μ˜ 숫자 μ€‘μ—μ„œ μ—†λŠ” 숫자λ₯Ό μ°Ύμ•„μ•Ό ν•œλ‹€.
* μ™„μ „ νƒμƒ‰μœΌλ‘œ μ •λ ¬ν•œ λ°°μ—΄μ—μ„œ μˆœμ„œλŒ€λ‘œ λΉ„κ΅ν•˜λ©΄μ„œ μ—†λŠ” 숫자λ₯Ό 찾을 수 μžˆλ‹€.
* Time Complexity: O(N)
* Space Complexity: O(N)
* Time Complexity: O(nlogn)
* Space Complexity: O(n)
*
* Follow up: Could you implement a solution using only O(1) extra space complexity and O(n) runtime complexity?
*/
Expand Down

0 comments on commit c9695a5

Please sign in to comment.