sorted list 3

Programming Exercise: Lab #5

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.Exercise #1ProblemsImplement the UNSORTED LIST using linked structure and ANSWER the time complexity questions in the code.Destructor(): Deallocate (delete) all nodes in the list.appendItem(item): Append the item to the list (with the best time complexity)removeItem(item): Delete "item" in the list and Deallocate (delete) the deleted item.getItem(pos): Retur..

CS/자료구조 2025.05.20

Chapter 6: Linked Structures (2)

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.Linked StructuresReview▶ Big-O Comparison of Stack Operations▶ Big-O Comparison of Queue OperationsArray vs. Linked StructurePerformanceGenerally, array-based structures are faster than linked structures.Most operations are equally fast for both array and linked structures (O(1)).For size(), clear(), and destructor, the array is faster (O(1) vs. O(n)).But, a..

CS/자료구조 2025.05.20

Chapter 2: Unsorted/Sorted Lists

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.List DefinitionsLinear relationship:Each element except the first has a unique predecessor(전임자), and each element except the last has a unique successor(후임자).Length:The number of items in a list; the length can vary over time. (e.g., append, remove)Unsorted list vs Sorted list ※ 배열(Array) vs 리스트(List)C 같은 언어에서 사용하는 배열(Array)은 크기가 고정되어 있어서 한 번 선언하면 크기를 바꿀 수 없..

CS/자료구조 2025.03.23