Hi Sam,
Originally posted by Sam Bluesman:
Does anyone know how to SEARCH AN UNSORTED ARRAY to see whether this item is in it.
Avoid using uppercase, it appears as if you're shouting. Use
bold or
italics to catch attention instead.
Originally posted by Sam Bluesman:
I see what your saying, but how do i use these true values? I know its returning true if found, but how do i use this?
Well, in the first place, why are you checking to see if X is in the array? There ought to be a reason for it. With that reason, you should know what you need to do if the value is in it right? It could be simply just telling that the value is in the array, or it could be part of a bigger problem.
Originally posted by Sam Bluesman:
may i remind u this forum page is for beginners. Maybe you should try the intermediate forum page if u find these questions too fundamental for your liking
I suppose Tony was trying to help you to perform self-help here. I don't think he meant to be offensive. Honestly speaking, any decent computer science textbooks would certainly tells you what search to use in an unsorted or sorted array, and they may contain the pseudo-codes as well. Maybe he was trying to get you to read the textbook better.
If you'd converted the pseudo-codes to
Java codes & encountered problem compiling or some bugs here & there, feel free to post it here for help.