This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Linked Lists - basic operations Linked lists intro 1 Linked lists intro 1 As an introduction to writing your own classes, you will implement a priority queue based on an underlying linked st. But first we need to take a look at the linked list itself list. But first we need to take a look at the linked list itself In Tutorial Workshop 10 you implemented a data structure which maintained list of Requests in order of priority. our solution based on an array of fixed length was very Your solution based on an array of fixed length was very limiting: the length of an array is fixed, so you to delete the lowest priority Requests if there were more Requests than the size of the array. The alternative, to declare the largest array that might ever be needed, could waste a lot of memory Inserting a new Request into the array required a lot of tricky 2 CSIS1117B Computer Programming 1 2011-2012 se t g a e equest to t e a ay equ ed a ot o t c y (and potentially buggy) pointer copying and manipulation Linked lists intro 2...
View Full Document
- Winter '11
- Array data structure, CSIS1117B Computer Programming