0
Please help me to make simple program linier search with sentinel and data well organize
2 Antworten
+ 1
Say you have an array of chars (for example), and you're told that the relevant information ends with a ".". Then you could write (pseudocode):
int i=0;
while(i<arr.length && arr[i]!=".") {
// do whatever you have to
}
Here, the "." is the sentinel.
+ 1
oke thanks