Modify the List class of Fig. 21.3 to include method search that recursively searches a linked-list object

Question:

Modify the List class of Fig. 21.3 to include method search that recursively searches a linked-list object for a specified value. The method should return a reference to the value if it’s found; otherwise, it should return null. Use your method in a test program that creates a list of integers. The program should prompt the user for a value to locate in the list.

Fig. 21.3I // Fig. 21.3: List.java 2 // ListNode and List class declarations. package com.deitel.datastructures; 3 4 5

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: