## Invitation to Computer Science 8th Edition

If the data file is sorted numerically by $SSN$, then the binary search algorithm can be used. The worst case is 29 ($2^{28}$ = $268,435,456$ and $2^{29}$ = $536,870,912$). If the data file is sorted alphabetically by the individual’s last name, then as far as searching for an $SSN$ is concerned, the file is unsorted. The sequential search algorithm must be used, with the worst case of $453,700,000.$
If the data file is sorted numerically by $SSN$, then the binary search algorithm can be used. The worst case is 29 ($2^{28}$ = $268,435,456$ and $2^{29}$ = $536,870,912$). If the data file is sorted alphabetically by the individual’s last name, then as far as searching for an $SSN$ is concerned, the file is unsorted. The sequential search algorithm must be used, with the worst case of $453,700,000.$