Question: Consider the following code fragment working with lists as defined in class let 1st1= ... // create a list with 3 elements const concat=
Consider the following code fragment working with lists as defined in class let 1st1= ... // create a list with 3 elements const concat= (11, 12) 1st1= concat(concat(1st1, // end of the code fragment 11.isEmpty? 12: node(11. head(), concat(11. tail(), 12)); 1st1), 1st1) How many list nodes (created with node()) are no longer accessible at the end of this code fragment?
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
In the code fragment you provided you are recursively concatenating the li... View full answer
Get step-by-step solutions from verified subject matter experts
