Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Loading
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Table of Contents

Appendix C: Sorting and Searching
Last change: February 13 2016 18:48:22.
<<PreviousNext>>

C.6 Sequential Search and Binary Search

After data in an array are sorted in order, they can be searched with more efficient algorithms. Data stored randomly can be searched only sequentially. The average number of comparisons required to find an item will be half of the number of elements in the array.
Last change: February 13 2016 18:48:23.
  1. Header for Quick Sort
  2. Comparing Backward
  3. Comparing Forward
  4. The Outer Loop
  5. Sorting the Sub-arrays
  6. Terminating the Procedure
  7. The Better, the Worse
  8. Solving the Paradox
  9. The Stack Space Issue
  10. The Complete Code for Quick Sort
  • C.5 Comparison of Performance
  • C.6 Sequential Search and Binary Search
    1. Improved Sequential Search with Sorted Data
    2. The Binary Search
    3. <<PreviousNext>>