Top 6 Coding Interview Concepts (Data Structures & Algorithms)
Number 6 : Heaps
- two variation : minimum heap, maximum heap
- Find minimum, maximum value or top k value 문제들에서 많이 사용
Number 5 : Sliding Window
- iterative through array n time
- type of algorithm that you can memorize and apply to many different problems
- keep track of two points, don't have to use nested loop
Number 4 : Binary Search
- Guess number higher or lower
- O(logn)
Number 3 : DFS & BFS
- Very common algorithm
- Most graph algorithm build on DFS & BFS
- You can solve very large number of problems with this
- Also with trees
- Once you write them so many times, it becomes like second nature. Very standard.
- Time & Space complexity
- usually O(V+E)
Number 2 : Recursion
- Is applied in so many places
- Also used in graph, back tracking, DP...
- 다른 recursion을 이용한 알고리즘들이 어려운건 recursion을 제대로 이해하지 못하고 있기 때문
Number 1 : HashMaps
- Two Sum이 HashMap을 이용한 가장 대표적인 문제
- HashMap만 사용해도 풀수있는 문제가 참 많음
- HashMap is always used as utility data structure to do things efficiently
'Programming > Coding Test' 카테고리의 다른 글
[Leetcode/Hashmap] 217. Contains Duplicate (feat.Java) (0) | 2023.07.10 |
---|---|
[Leetcode/Hashmap] Two sum (feat. Java) (0) | 2023.07.10 |
[종만북] 보글 게임 with Java (0) | 2020.10.13 |
프로그래머스 레벨2 - 탑 (0) | 2020.04.05 |
프로그래머스 레벨2 - 멀쩡한 사각형 with Java (0) | 2020.04.05 |