1. A list is a collection of elements of the same type. 2. In order to maintain
ID: 3709132 • Letter: 1
Question
1. A list is a collection of elements of the same type. 2. In order to maintain and process the list in an array, we need the array holding the list elements, a variable to store the length of the list, and a variable to store the size of the array. Every node in a linked store the address. 3. list has two components: one to store the relevant information and one to ed The algorithms to implement the operations search, insert, and remove are the same for sort and unsorted lists. 4. 5. Operations such as search, insert, and delete require a linked list to be sorted. The usual operations on lists with header and trailer nodes are to initialize the list, destroy the list, print the list, find the length of the list, search the list for a given item, insert an item in the list, delete an item from the list,and copy the list 6. 7. You can use stacks to convert recursive algorithms into nonrecursive algorithms, especially recursive algorithms that are not tail recursive. 8. Functions such as push and pop that are required to implement a stack are not inherently available to C+ programmers. 9. An array is a random access data structure; a stack is not. 10. The bottom element of the stack is the last element added to the stack. 11. To delete a given item from an ordered linked list, there is no need to search the list to see whether the item to be deleted is in the list. 12. A stack is called a LIFO data structure. 13. When an integer is subtracted from a pointer variable, the value of the pointer variable is decremented by the integer times half the size of the memory to which the pointer is pointing. 14. In a linked list implementation of a stack, only a fixed number of elements can be pushed onto the stack. 15. Header and trailer nodes are considered part of a linked list.Explanation / Answer
1. true
2.false. We need to store the elements in the array only.
3. true.
4. false. the algorithms are diffferent for sorted and unsorted lists.eg binary serach is used in case of sorted list and linear search is used for unsorted list.
5.false. linked list needs not be sorted for applying these operations.
6. true.
7. false. Stacks are used in recursive algorithms.
8. false. Stack library is available for push() and pop() methods which are inbuilt.
9. false, An array is sequential data structure which use index.
10. false. The bottom elements was inserted first and the top element is the element inserted last. its a LIFO structure.
11. false. The linked list need to be traversed using address pointer to serach for the item to be deleted.
12. true
13. false. pointer variable arithmetic is used for incrementing or decrementing the address not value it is pointing.
14. false, a linked list can be extended to any number of elements unlike array.
15. true.
Do ask if any doubt. Please upvote.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.