• [LeetCode] Task Scheduler

    Url: https://leetcode.com/problems/task-scheduler/description/ Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle. ...

    Read More
  • [LeetCode] Merge 2 Sorted LinkedList

    Url: https://leetcode.com/problems/merge-two-sorted-lists Question: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 솔직히 너무 쉬운 문제라 안올릴까 했는데 그냥 정리차원에서.. 사이즈를 알 필요도 없고, 단순히 두 개의 리스트 돌면서 그때마다 크기 비교해서 작은 ...

    Read More
  • [LeetCode] Merge K Sorted Lists

    url: https://leetcode.com/problems/merge-k-sorted-lists Question: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. k개의 정렬된 링크드 리스트를 합치는 문제. 물론 정렬된 상태의 한개의 리스트로. 다양한 방법이 나올 수 있지만, 가장 처음 생각한 것은 재귀적 방법이다. 두 개의 리스트를 합치는 방법이야 알고 있으니 (리스트 두개를 ...

    Read More
  • [LeetCode] 3Sum

    Url: https://leetcode.com/problems/3sum/description/ Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. For example, given ...

    Read More