I have to make a sequential search method where I have to find the last occurrence of an item. I just want to make sure, it basically means I'll just have to start the search from the end of an array, right?
2 replies to this topic
#1
Posted 04 October 2011 - 01:39 PM
|
|
|
#2
Posted 04 October 2011 - 03:26 PM
You can start a sequential search from the beginning or the end.
In your case, it is more efficient to start at the end of the array though.
So yes, I'd start the search from the end of the array.
In your case, it is more efficient to start at the end of the array though.
So yes, I'd start the search from the end of the array.
#3
Posted 14 October 2011 - 02:57 PM
Yes, that's what I thought. Thanks for confirming. ^^
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









