์ฝ๋ฉํ
์คํธ/LeetCode
2022. 7. 25.
[LeetCode] Median Of Two Sorted Arrays
๋ฌธ์ ๋งํฌ Median of Two Sorted Arrays - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com ์ค๋ฆ์ฐจ์์ผ๋ก ์ ๋ ฌ๋ num1, num2๋ฅผ ๋ณํฉํ์ฌ median ๊ฐ์ ๋ฐํํ๋ ๋ฌธ์ ์ด๋ค. median ๊ฐ์ด๋ ๋ณํฉํ ๋ฐฐ์ด์ ์ค์๊ฐ์ ์๋ฏธํ๊ณ ๋ฐฐ์ด์ด ์ง์์ผ๋๋ 2๊ฐ, ๋ฐฐ์ด์ด ํ์์ผ๋๋ 1๊ฐ๊ฐ ํด๋น๋๋ค. ์) [1,2,3,4,5] ์ median์ 3, [1,2,3,4,5,6]์ median์ (3 + 4) / 2 ์กฐ๊ฑด : time complexity sho..