SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start

level: Lists

Questions and Answers List

level questions: Lists

QuestionAnswer
Whats the definition of a listA finite collection of ordered data
Which is the best definition of array-based list?​A list in which the storage order corresponds to the logical order​
Whats a sequence/ list?Its a finite ordered collection of data
Desrcibe the way a list wokrs???????????????????????????????????????????????????????????????? NOdes ???????????
Stacks and Queues are specialist types of what?Lists
How would u impliment an array based list?What an array
Are arrays static or dynamic?Static Cant change size at runtime
Define what a generic list isA list whereby the type of its contents arent predetermined So a generic list could be a list of: integers strings booleans...
How do u declare a generic datatype in C#<>
What are the advatnages of generic listsHave lots of useful methods Maximize code reuse Maximise performance
What are the disadvatnages of generic listsAllow for more mistakes to be made Allow for lazy codying
What is special about a sorted listThe elements are in some sort of order
State the process of adding an item in a sorted listStart at the bottom of the list​ Work up the list, comparing each item with the item to be inserted: if its greater in terms of the way in which the list is ordered then move it down​ Stop when you reach an item which comes before the new item​ Insert the new item one below that point
When adding an item to a sorted list, what if the list is empty?​The item to be inserted will become the first item
When adding an item to a sorted list, what if the list is full?​An exepction will be thrown
Describe what happens to the other items when adding a new item in the first position of a listEvery item after will have to be moved down 1
State the process of removing the nth item in a sorted listIDK? Start at the bottom of the list​ Work up the list, comparing each item with the item to be removed:​ if they are equal to eachother then remove the item