전체 글 (12) 썸네일형 리스트형 [Leetcode][Python] 389. Find the Difference 리트코드 / 파이썬 / 389. Find the Difference leetcode.com/problems/find-the-difference/submissions/ Find the Difference - 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 풀이 방법 easy 문제라 쉽게 풀어 제출했지만, discuss에서 비트 연산과 ASCII 코드를 이용한 풀이 방법이 있어 포스팅하게 되었다. 아래 Example1과 같이 추가된 문자 1개만 반환하면 되는 문제다... [Leetcode][Python] 80. Remove Duplicates from Sorted Array II 리트코드 / 파이썬 / 80. Remove Duplicates from Sorted Array II leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ Remove Duplicates from Sorted Array II - 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 풀이 방법 파이썬을 사용한다면 어렵지 않은 문제다. 정렬된 리스트에서, 중복이 2개 이상인 경우 해당 element를 삭제만 해주면 되.. [Leetcode][Python] 229. Majority Element II 리트코드 / 파이썬 / 229.Majority Element II leetcode.com/problems/majority-element-ii/ Majority Element II - 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 풀이 방법 처음에 생각한 방법은 dictionary(hashmap)으로 number 별 count 수를 늘리는 방법, 그리고 O(nlogn)으로 정렬한 후 한 번 순회하며 count를 더해나가는 방법이었다. 하지만 문제에서는 time O.. 이전 1 2 3 4 다음