Posted by: techGuy February 20, 2009
Login in to Rate this Post:
0
?
Not sure if this is correct
Multiwaysearch(keyList,start,end,searchKey)
//keylist the list of keys
//start the index of the first value to consider
//end the index of the last value to consider
//searchKey the element of list we want
if start<end then
result= compare(keyList,searchKey)
if result > 0 then
return result
else
if result < 0 then
return Multiwaysearch(keyList, links[abs(result)],end,searchKey)
end if
end if
Multiwaysearch(keyList,start,end,searchKey)
//keylist the list of keys
//start the index of the first value to consider
//end the index of the last value to consider
//searchKey the element of list we want
if start<end then
result= compare(keyList,searchKey)
if result > 0 then
return result
else
if result < 0 then
return Multiwaysearch(keyList, links[abs(result)],end,searchKey)
end if
end if