Unit 5 Session 2 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
Barbie -> President Barbie -> Weird Barbie -> Ken
.Plan the solution with appropriate visualizations and pseudocode.
General Idea: Initialize each named node and link them together to represent the sequence given in the array.
1) Create nodes for each character in the given order using the `Node` class.
2) Set the `next` attribute of each node to point to the subsequent node, forming a chain from the first to the last.
⚠️ Common Mistakes
node_1 = Node("Barbie")
node_2 = Node("President Barbie")
node_3 = Node("Weird Barbie")
node_4 = Node("Ken")
node_1.next = node_2
node_2.next = node_3
node_3.next = node_4