Question: The purpose of this Lab : Design and develop Applications that incorporate fundamental data structures such as: Singly Linked Lists Doubly Linked Lists Arrays Exercise

The purpose of this Lab :
Design and develop Applications that incorporate fundamental data structures such as:
Singly Linked Lists
Doubly Linked Lists
Arrays
Exercise 1
In this exercise, you will use the DoublyLinkedList implementation. Write a Python program to search a specific item in a given doubly linked list and return true if the item is found otherwise return false.
Exercise 2
In this exercise, you will add a method swapNodes to SinglyLinkedList class. This method should swap two nodes node1 and node2(and not just their contents) given references only to node1 and node2. The new method should check if node1 and node2 are the same node, etc. Write the main method to test the swapNodes method. Hint: You may need to traverse the list.
Exercise 3
Write a Python program to check whether it follows the sequence given in the patterns array.
Pattern example:
For color1=["red", "green", "green"] and patterns =["a","b","b"]
the output should be samePatterns(color1, patterns)= true;
For color2=["red", "green", "greenn"] and patterns =["a","b","b"]
the output should be samePatterns (strings, color2)= false.
Please provide me with full solution/codes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!