00:01
Hello students, to implement a function called a find value that recursively determines whether the given data value is in a linked list.
00:08
So you can define a recursive function that checks each node of the linked list until it finds the value or reaches the end of the list.
00:18
So as of that, here is the python implementation where it provides you a singly linked list and structured using the list node class and it includes the function findvalue to define whether a given value is present in a linked list.
00:37
So as the list node, here the list node is a class used to create the individual node of the linked list.
00:46
So each node has an attribute of a data which stores the data for the node and which points to the next node in the list.
00:56
Initially next is set to the none.
00:59
So when then the findvalue function it takes the two arguments as the value and the node.
01:05
The value to search for and the node, the current node being checked.
01:12
So it checks, it uses the recursive logic to search the value in the linked list.
01:20
So whereas in the case 1, if the current node is a none, then it means that the end of the list has been reached and the value is not found.
01:32
So in this case, the function returns false...