If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Help!! using recursion to search an array

Hi there,
I have been learning Java in my computer science course for the last couple of months. Everything was goin fine until I hit the brick wall which was recursion. I am very slowly getting my head around it. Anyway, I was wondering if anyone would have some code for how to search an array for the lowest number in the array (must use recursion!!). Most of the recursive code in the text books sorts the numbers to different positions in the array using various sort methods and the search methods I have looked at already know the value that they are looking for in the array. All I am looking for is a simple, explained method or class which will take in an unsorted array and throw back the lowest number in the array, but it must use recursion as an iterative search for the lowest number is no good to me.