Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

알고리즘과 자료구조를 정리해두었습니다.

NotificationsYou must be signed in to change notification settings

lemidia/Algorithm-and-Data-Structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

In mathematics and computer science, an algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always unambiguous and are used as specifications for performing calculations, data processing, automated reasoning, and other tasks. - Wikipedia.

수학과 컴퓨터 과학에서, 알고리즘은 일반적으로 어떤 집합의 문제를 풀기 위하거나 계산을 수행하기 위해, 잘 정의된 한 유한순서이자, 컴퓨터가 실행할 수 있는 지시사항들 입니다. 알고리즘은 항상 모호하지 않고, 계산이나 데이터 처리, 자동 추론 등등 여러곳에서의 명세로 사용됩니다.

DFS & BFS - 깊이우선탐색 & 너비우선탐색

Binary Search - 이분탐색

Back Tracking + Brute Force - 백트래킹 + 전체탐색 다 해보기

Tree Algorithm - 트리 알고리즘

Shortest Path - 최단경로 알고리즘

Sorting - 정렬

  • Quick sort - 빠른정렬, Worst case: O(n^2), Average case: O(nlogn) where n is the number of item in an array

  • Merge sort - 병합정렬 O(nlogn), Worst case: O(nlogn) where n is the number of item in an array

  • Counting sort - 카운팅 소트, 계수정렬, O(kn) where k is upper bound number, n is the # of items in an array

  • Selection sort - 선택정렬 Worst case: O(n^2)

  • Bubble sort - 버블소트 Worst case: O(n^2)

  • Insertion sort - 삽입정렬 Worst case: O(n^2)

  • Heap sort - 힙 정렬 Worst case: O(nlogn)

  • Radix sort - 기수 정렬, Time Complexity: O(nw) n = 정렬될 키의 개수, w = 정렬될 키 중에서 가장 큰 자릿수

  • Bucket sort - 버킷 소트

Topological Sort - 위상정렬

Dynamic Programming - 동적 프로그래밍 (잘 알려진 문제들)

Dynamic Programming - 동적 프로그래밍 (추가)

Prime - 소수

GCD, LCM - 최대공약수, 최소공배수

  • GCD - 최대공약수

  • LCM - 최소공배수

Permutation & Combination - 순열과 조합

Minimum Spanning Tree Algorithm - 최소 신장 트리 알고리즘

  • Kruskal's Algorithm - 가능한 가중치가 가장 작은 간선으로 시작해 N-1개의 간선을 선택하는 Greedy Algorithm

  • Prim's Algorithm

Network Flow - 네트워크 유량

  • Ford-Fulkerson method - 최대유량 알고리즘

  • Edmonds Karp Algorithm - 최대유량 알고리즘, Ford Fulkerson method에서의 탐색방법을 BFS로 적용

  • Min Cost Max Flow - 최소비용 최대유량 알고리즘, 최소비용에는 SPFA Algorithm, 최대비용에는 Edmonds Karp Algorithm 적용

Bipartite Matching - 이분매칭

Strongly Connected Component - 강한 연결 요소

Cut Edge and Articulation Point - 단절선과 단절점

Cycle Detection Algorithm in a graph - 그래프에서의 사이클 탐지

LCA - 최소 공통 조상

String Pattern Matching - 문자열 패턴 매칭

  • KMP Pattern Matching Algorithm - KMP(Knuth, Morris, Pratt) 패턴 매칭 알고리즘, O(n+m) where n is pattern matching and m is LPS construction (LPS : Longest Proper Prefix which is also Suffix)

  • Boyer Moore Algorithm - Using Bad Character Rule

  • Rabin Karp Algorithm

Other Algorithm

  • Count Inversions In An Array - 인덱스 위치가 i < j 이면서 A[i] > A[j]인 원소들을 역전관계라고 한다. 역전관계의 원소들이 해당 배열안에 몇개나 있는지 찾는 알고리즘. 머지소트를 이용한다. O(nlogn), Naive Approach : O(n^2)

Data structure

In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. - Wikipedia

Queue - 큐

Stack - 스택

Linked List - 연결 리스트

Graph - 그래프

Set - 집합 (중복된 원소를 허용하지 않는 자료구조)

Priority Queue / Heap - 우선순위 큐 / 힙

Indexed Priority Queue / Indexed Heap - 인덱스 우선순위 큐 / 인덱스 힙

  • [Implementation]

Dynamic Array - 동적 배열

Disjoint Set - Union Find by Rank with Path Compression - 서로소 집합

Tree - 트리

Binary Search Tree - 이진탐색트리

Segment Tree - 세그먼트 트리

Fenwick Tree or Binary Indexed Tree - 펜윅트리

  • Fenwick Tree - Range Sum Query - Construction : O(n), Update: O(logn), Sum Query : O(logn)

Sparse Table

Trie or Prefix Tree - 트라이, 접두사 트리

Bit Manipulation - 비트 조작


[8]ページ先頭

©2009-2025 Movatter.jp