코딩 인터뷰 준비 – 팁과 나의 계획

뭐 여러글을 통해 밝혔지만, 코딩 인터뷰 준비라는 것이 비단 회사 이직을 위해 필요한 것이 아니라 내가 가지고 있는 머릿속의 문제해결능력을 바꾸는 데에 큰 도움이 된다는 것을 누차 느끼고 있다. 사실 작년 10월경부터 코딩공부는 하긴 했다. 리트코드 약 100문제, CTCI는 5판기준 다 보고, MIT의 Introduction to Algorithms강의를 듣고 책을 정독했다. 그리고 몇몇 유튜브 영상을 봤다. 그런데…

Read Full News

[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. However, there is a non-negative…

Read Full News

[LeetCode] Largest Rectangle in Histogram

Url: https://leetcode.com/problems/largest-rectangle-in-histogram Question: Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3]. The largest rectangle is shown in the shaded area, which has area…

Read Full News

[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 Full News

[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 Full News