Menu

[solved]-Linked Lists Stacks Queues Assignment Part1 Using Definition Doubly Linked List Implementa Q38991202

Linked Lists, Stacks and Queues assignment.

Part1: Using the definition of a Doubly Linked Listimplementations,  implement the functions defined inzyBook table 2.1.1

OperationDescriptionExample starting with list: 99, 77Append(list, x)Inserts x at end of listAppend(list, 44), list: 99, 77, 44Prepend(list, x)Inserts x at start of listPrepend(list, 44), list: 44, 99, 77InsertAfter(list, w, x)Inserts x after wInsertAfter(list, 99, 44), list: 99, 44, 77Remove(list, x)Removes xRemove(list, 77), list: 99Search(list, x)Returns item if found, else returns nullSearch(list, 99), returns item 99
Search(list, 22), returns nullPrint(list)Prints list’s items in orderPrint(list) outputs: 99, 77PrintReverse(list)Prints list’s items in reverse orderPrintReverse(list) outputs: 77, 99Sort(list)Sorts the lists items in ascending orderlist becomes: 77, 99IsEmpty(list)Returns true if list has no itemsFor list 99, 77, IsEmpty(list) returns falseGetLength(list)Returns the number of items in the listGetLength(list) returns 2

For the Print function, implement a Recursive version. onRecursion for implementation details. Don’t do the sort method.Please test all the function(do not forget to include the funtionson the main function in order to test it ) and do not forget toinclude all the double linked function listed above .Thank you .PLZ write the code C++

Expert Answer


Answer to Linked Lists, Stacks and Queues assignment. Part1: Using the definition of a Doubly Linked List implementations, implem… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *