Question: (d) (Graded for fair effort completeness) Define two functions: (1) the function remove: LxN+L that removes one node containing a given value (if present) from

(d) (Graded for fair effort completeness) Define two functions: (1) the function remove: LxN+L that removes one node containing a given value (if present) from a linked list and (2) the function remove All: LXN L that removes all nodes containing a given value (if present) from a linked list. Here are some sample function applications that your definition should produce: remove All (1, 1),3 ) = (1,1) remove( (1,1)),3 ) = (1,1) remove( (3,(1,(3,1)),3 ) = (1, (3, 1)) remove All( (3,(1,(3, 1))),3 ) = (1, ) (d) (Graded for fair effort completeness) Define two functions: (1) the function remove: LxN+L that removes one node containing a given value (if present) from a linked list and (2) the function remove All: LXN L that removes all nodes containing a given value (if present) from a linked list. Here are some sample function applications that your definition should produce: remove All (1, 1),3 ) = (1,1) remove( (1,1)),3 ) = (1,1) remove( (3,(1,(3,1)),3 ) = (1, (3, 1)) remove All( (3,(1,(3, 1))),3 ) = (1, )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
