![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
0005
文章平均质量分 86
看不到东西的话,说明不是给你看的 ;-)
我的Android手机
你的Android手机
展开
-
COMP0005-Notes(7): Balanced Search Trees
Contents2-3 Search TreeStructureAssociated MethodsGet(Search)Put(Insert)AnalysisRed-Black Binary Search Tree 2-3 Search Tree Structure A 2-3 search tree follows the basic construction of a tree, with a minor difference being that it has two types of nodes:原创 2022-02-20 05:03:49 · 303 阅读 · 0 评论 -
COMP0005-Notes(6): Binary Search Trees (BST)
ContentsStructureAssociated MethodsGet(Search)PseudocodePut(Insert)Main IdeaPseudocodeImplementation ExplainedFloorCeilingDelete MinimumMain IdeaPseudocodeImplementation ExplainedDeleteMain Idea Structure Base case1: Null is a tree. Base case2: A single no原创 2022-02-08 08:10:31 · 67 阅读 · 0 评论 -
COMP0005-Notes(5): Heap Sort
ContentsHeapBinary HeapNormal Binary TreeBinary HeapEnqueue()Dequeue()Heap SortMain IdeaAnalysisComplexityBenefitsDrawbacks Heap Heap can occur in many forms. If it can be treated as a linear queue, where each element is associated with a priority value. T原创 2022-01-31 09:36:54 · 363 阅读 · 0 评论 -
COMP0005-Notes(4): Quick Sort
ContentsMain IdeaAnalysisComplexityBenefitsDrawbacksPossible fix Main Idea Randomly shuffle the input array once Choose a pivot from the array and insert it into the “correct” position - where all elements to the left are smaller and all elements to the r原创 2022-01-27 09:04:14 · 109 阅读 · 0 评论 -
COMP0005-Notes(3): Merge Sort
ContentsMain IdeaDividingMerging(Conquering)Primitive & Time-wastingImprovedComplexityMemoryStability Main Idea Dividing Idea that each length-1 array is inherently sorted Merging(Conquering) Idea of merging two pre-sorted sub-arrays by always compa原创 2022-01-24 05:52:30 · 130 阅读 · 0 评论 -
COMP0005-Notes(2): Selection sort & Insertion sort
ContentsSelection SortMain IdeaInvariantsComplexityInsertion SortMain IdeaInvariantsComplexity Selection Sort Main Idea Scan the array from the left to the right of the array; n iterations; in each iteration i (0 <= i <= n-1), find the index min of原创 2022-01-24 03:28:25 · 520 阅读 · 0 评论 -
COMP0005-Notes(1): Abstract Data Types(ADTs)
ContentsCircular queuesInitialising a circular queueInserting first elementAdding (Inserting) more elementsDeleting an element Circular queues The core idea of a circular queue is that the pointer of the tail should directly point to the head. Initialising原创 2022-01-23 19:40:40 · 152 阅读 · 0 评论