LinkedList 3

[Lecture3: part2] - Delete Operation

일단... 삭제는 방법이 2개 있다. 1. Delete location known2. Delete with search (애는 search running time 와서 합치는 식이다) When we want to delete something, there are two possibilities:We already know where the element/node isWe only know the key/value, so we must search first So the running time changes depending on whether:we know the locationor we must search by key firstAndin an array, “location known” means ..

[Lecture3] - Different kinds of Linked List

앞 수업에 배웠던 내용이 Singly Linked List 라고 구분하고 그 외 Linked List 들에 대한 공부해보려 한다. 1. Doubly Linked List a keya pointer to the next nodea pointer to the previous node2. Circular Linked List the last node does not point to null instead, it points back to the first node3. Circular Doubly Linked List the last node points to the first node and the first node points back to the last node 그리고 size 에 대한 알아보려 하..

[Lecture2] - Abstract Data Structure

Big-O : upper bound --> g(n)이 윗선(upper bound) 역할을 한다. 즉, 충분히 큰 n 이후엔 파란 선이 검은 선 아래에 있음 Big-Ω : lower bound --> g(n)이 아랫선(lower bound) 역할. 즉, f(n)이 적어도 g(n) 정도는 커진다는 뜻. Big-Θ : tight bound --> f(n)과 g(n)이 같은 정도의 성장률을 가진다 Big-O, Ω, Θ는 다 공통적으로 “충분히 큰 n부터” 라는 조건이 있어! 즉, 작은 n 몇 개는 이상해도 상관없고 어느 시점 n₀ 이후부터 성립하면 된다. 여기서 문제 하나... 그럼 n = 0이면 g(n)이나 βg(n)가 0이 될 수도 있는데 괜찮나? 위에 말했던 거처럼 모든 n 이 아니..