본문 바로가기

Part 5 -명사(1)- 명사의 역할과 위치 Points 1. 명사의 역할: 주어, 동사의 목적어, 전치사의 목적어, 주격보어, 목적격 보어 2. 명사의 위치: 관사/소유격/형용사 + 명사 1. 명사의 역할 주어 Flights from Milan to Paris are supposed to depart every forty minutes except under severe weather conditions. (밀라노에서 파리로 가는 비행편은 40분마다 출발하기도 되어있다. / 심한 악천후를 제외하면) 동사의 목적어 Easton Corporation is exceptional in that it provides full refunds to dissatisfied customers even without a sales receipt. (이스턴 사는 이.. 더보기
자료구조 : Tree(3) - AVL Tree - 이번 포스팅에서는 다른 Tree 구조를 알아보는 시간을 가지겠다. Contents AVL Tree Idea AVL Tree Definition AVL Tree Height Bound Proof AVL Tree Insertion AVL tree 는 최악의 경우에서 tree height 가 크지 않은 tree 구조이다. 지난번에 다른 BST보다 훨씬 더 어려울 것이다. AVL Tree Idea 아이디어는 다음과 같다. 위의 tree 구조를 살펴 보자. 보기에 아름다운(?) 구조 인가? 아마 대부분 그렇게 생각하지 않을것이다. Tree 가 왼쪽으로 쏠려 있는 모양을 하고 있기 때문이다. 그럼 위의 그림을 직관적으로 봤을떄 어떻게 고치면 높이가 최소화된 Tree 모양이 나올까? 아마 4가 root인 모양으로 변.. 더보기
자료구조 : Tree(2) - Binary Search Tree- 지난 번에 이어서 Binary Search Tree 의 Delete 과정을 자세하게 알아보겠다. 앞의 Search 와 Insert에 비해 복잡하기 때문에 험난한(?) 여정이 될 것이다. Delete Algorithm Do search() first If Search() fails, Delete() also fails If Search() succeeds Case 1 : Node has no Child Case 2 : Node has one Child Case 3 : Node has two Children Case 1 Correctness trivial child가 없는 노드를 지울 때 아무 문제 없는지 살펴보자. 만약 8번 노드 왼쪽에 subtree 가 있으면 지워져도 그 subtree는 child가 없.. 더보기