Question: Write the member function prior_v(T v, int count), which searches for a node with the value v (first occurrence), and then returns a list
Write the member function prior_v(T v, int count), which searches for a node with the value v (first occurrence), and then returns a list with all the nodes (up to count nodes) right before that node. If the value v is not found or the first occurrence of v is at the head node, the function should return an empty list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
