read

알고리즘 스터디

알고리즘 유형별로 정리된 사이트를 이용해서 공부하자!

1. https://www.geeksforgeeks.org/top-10-algorithms-in-interview-questions/

8가지 주제에 대해 배우기 좋은 Top 10 문제들을 뽑아놨다.

1. Graph

  1. BFS
  2. DFS
  3. Dijkstra
  4. Floyd Warshall
  5. Union Find
  6. Prim
  7. Kruskal
  8. Topological Sort
  9. Boggle
  10. Bridges

2. Linked List

  1. Insertion
  2. Delete
  3. Compare two strings
  4. Add Two Numbers
  5. Merge
  6. Reverse
  7. Union and Intersection
  8. Detect and Remove Loop
  9. Merge Sort
  10. Select random node

3. Dynamic Programming

  1. Longest Common Subsequence
  2. Longest Increasing Subsequence
  3. Edit Distance
  4. Minimum Partition
  5. Cover Distance
  6. Longest Path in Matrix
  7. Subset Sum Problem
  8. Optimal Strategy
  9. 0-1 Knapsack Problem
  10. Boolean Parenthesization Problem

4. Sorting and Searching

  1. Binary Search
  2. Searing in sorted, rotated array
  3. Bubble Sort
  4. Insertion Sort
  5. Merge Sort
  6. Heap Sort(Binary Heap)
  7. Quick Sort
  8. Interpolation Search
  9. Find Kth Smallest/Largest Element in Unsorted Array
  10. Given sorted array and x, find the pair whose sum is closest to x

5. Tree/ Binary Search Tree

  1. Find Minumum Depth of a Binary Tree
  2. Maximum Path Sum in a Binary Tree
  3. Preorder Traversal of BST
  4. check full binary tree or not
  5. Bottom view Binary Tree
  6. Top view Binary Tree
  7. Remove nodes on root to leaf paths of length < K
  8. Lowest Common Ancestor in BST
  9. Check binary tree is subtree of another binary tree
  10. reverse alternate levels of a perfect binary tree

6. Number Theory

  1. Modular Exponentiation
  2. Modular multiplicative inverse
  3. Primality Test Set 2 (Fermat Method)
  4. Euler’s Totient Function
  5. Sieve of Eratosthenes
  6. Convex Hull
  7. Basic and Extended Euclidean algorithms
  8. Segmented Sieve
  9. Chinese remainder theorem
  10. Lucas Theorem

7. BIT Manipulation

  1. Maximum Subarray XOR
  2. Magic Number
  3. Sum of bit differences among all pairs
  4. Swap All Odds And Even Bits
  5. Find the element that appears once
  6. Binary representation of a given number
  7. Count total set bits in all numbers from 1 to n
  8. Rotate bits of a number
  9. Count number of bits to be flipped to convert A to B
  10. Find Next Sparse Number

8. String / Array

  1. Reverse an array without affecting special characters
  2. All Possible Palindromic Partitions
  3. Count triplets with sum smaller than a given value
  4. Convert array into Zig-Zag fashion
  5. Generate all possible sorted arrays from alternate elements of two given sorted arrays
  6. Pythagorean Triplet in an array
  7. Length of the largest subarray with contiguous elements
  8. Find the smallest positive integer value that cannot be represented as sum of any subset of a given array
  9. Smallest subarray with sum greater than a given value
  10. Stock Buy Sell to Maximize Profit

1번, 3번 주제와 Binary Tree 와 관련된 4번, 5번 주제에 집중해서 공부해야 겠다.

2. https://programmers.co.kr/learn/challenges?tab=practice_kit

  1. 해시
  2. 스택/큐
  3. 정렬
  4. 완전탐색
  5. 그리디
  6. DP
  7. DFS/BFS
  8. BST
  9. Graph

프로그래머스는 깔끔하게 잘 정리되어 있다.
6번부터는 좀 더 공부해야 한다.

Blog Logo

JaehunSim


Published

Image

JaehunSim's Blog

JaehunSim's blog

Back to Overview