What will be the problem with the following algorithm for finding an item in an unsorted array? How can you solve it?
int location = 0;
bool moreToSearch = (location > length);
found = false;
while (moreToSearch && !found)
{
if(item == info[location])
item = info[location];
}
else
location++;
moreToSearch = (location > length);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here