- #211
Mark44
Mentor
- 37,794
- 10,187
It's worth mentioning that one application of double indirection is a binary search of an ordered list. A function that is passed two pointers to different locations in the list can find the midpoint of the list, and determine whether the search target is in one or the other half of the list. The function can modify one of the passed pointers, and then call itself recursively to resume the search.
This is one of the things that you would learn in studying data structures and algorithms.
This is one of the things that you would learn in studying data structures and algorithms.