Recursive Searching

  • Thread starter mostvaluableprogrammer
  • Start date
M

mostvaluableprogrammer

Hello,

I have a two lists (generic type <string>), I need to search the first list, get the result and search the second list, get the result, search the first list, etc, etc and toggle my searches back and forth between the two lists until nothing is found.

Has anyone written a recursive search like this before ?

Any help would be appreciated.

Sincerely,

Matt
 
A

Arne Vajhøj

I have a two lists (generic type <string>), I need to search the
first list, get the result and search the second list, get the
result, search the first list, etc, etc and toggle my searches back
and forth between the two lists until nothing is found.

Has anyone written a recursive search like this before ?

I don't think I have.

But what is the problem?

Pseudo code:

search1() {
search in list 1
if some condition call search2
}

search2() {
search in list 2
if some condition call search1
}

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top