In a binary search the table element key values must be in ascending or descending sequence. The table is 'halved' to search for equal to, greater than or less than conditions until the element is found. In a sequential search the table is searched from top to bottom, so (ironically) the elements do not have to be in a specific sequence. The binary search is much faster for larger tables, while sequential works well with smaller ones. SEARCH ALL is used for binary searches; SEARCH for sequential.
Posted Date:- 2021-09-02 23:04:58
You are writing report program with 4 levels of totals: city, state, region and country. The codes being used can be the same over the different levels, meaning a city code of 01 can be in any number of states, and the same applies to state and region code so how do you do your checking for breaks and how do you do add to each level?