컴퓨터공학과 [알고리즘] 12주차 1차시 Greedy algorithm과 함께 Optimazation Programming을 해결할 수 있는 기법 중 하나 - 문제를 여러 개의 subproblem으로 쪼개어 해결 top-down 방법(memoization 방법) : recursion bottom-up 방법 : base case부터 loop 이용 subproblems의 solution을 저장함으로써 space는 더 사용하되 속도를 개... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 11주차 2차시 single-pair shortest path: Dijkstra's Algorithm Floyd-Warshall's Algorithm G* the transitive closure of a digraph G G와 vertices가 같음 u->v directed path가 존재할 때 directed edge 정보 추가 edge가 바로 존재하면(G*의 transitive closure을 계산하고... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 5주차 1차시 Analysis Worst-Case Complexity Average Behavior shiftVacRec가 핵심 첫번째 인덱스만 따로 빼 준 이유는 앞의 원소와 크기를 비교할 필요가 없기 때문에 1회 비교 Optimality 인접한 원소끼리 비교하고 위치를 바꾸어 줌 데이터 탐색 시 순차 접근만 가능 따라서 연산에 제한 조건이 존재할 때에는 optimal하지만 일반적으로는 그렇지 않음 * ... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 4주차 2차시 Binary Tree - 노드가 없는 트리는 empty binary tree / null binary tree라고 함 Binary Tree Property 2d개의 노드가 존재, complete binary tree 2h+1−1개의 노드를 가짐, complete binary tree O(n) O(lg n) O(n) O(lg n) O(n) 두 집합의 set id를 s, t라고 할 때, 이 둘이... 알고리즘컴퓨터공학과알고리즘
[알고리즘] 12주차 1차시 Greedy algorithm과 함께 Optimazation Programming을 해결할 수 있는 기법 중 하나 - 문제를 여러 개의 subproblem으로 쪼개어 해결 top-down 방법(memoization 방법) : recursion bottom-up 방법 : base case부터 loop 이용 subproblems의 solution을 저장함으로써 space는 더 사용하되 속도를 개... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 11주차 2차시 single-pair shortest path: Dijkstra's Algorithm Floyd-Warshall's Algorithm G* the transitive closure of a digraph G G와 vertices가 같음 u->v directed path가 존재할 때 directed edge 정보 추가 edge가 바로 존재하면(G*의 transitive closure을 계산하고... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 5주차 1차시 Analysis Worst-Case Complexity Average Behavior shiftVacRec가 핵심 첫번째 인덱스만 따로 빼 준 이유는 앞의 원소와 크기를 비교할 필요가 없기 때문에 1회 비교 Optimality 인접한 원소끼리 비교하고 위치를 바꾸어 줌 데이터 탐색 시 순차 접근만 가능 따라서 연산에 제한 조건이 존재할 때에는 optimal하지만 일반적으로는 그렇지 않음 * ... 알고리즘컴퓨터공학과알고리즘 [알고리즘] 4주차 2차시 Binary Tree - 노드가 없는 트리는 empty binary tree / null binary tree라고 함 Binary Tree Property 2d개의 노드가 존재, complete binary tree 2h+1−1개의 노드를 가짐, complete binary tree O(n) O(lg n) O(n) O(lg n) O(n) 두 집합의 set id를 s, t라고 할 때, 이 둘이... 알고리즘컴퓨터공학과알고리즘