Skip to Content
C++ How to Program, Sixth Edition
book

C++ How to Program, Sixth Edition

by P. J. Deitel - Deitel & Associates, Inc., H. M. Deitel - Deitel & Associates, Inc.
July 2007
Beginner to intermediate
1504 pages
44h 24m
English
Pearson
Content preview from C++ How to Program, Sixth Edition

Chapter 19. Searching and Sorting

 

With sobs and tears he sorted out Those of the largest size ...

 
 --Lewis Carroll
 

Attempt the end, and never stand to doubt; Nothing’s so hard, but search will find it out.

 
 --Robert Herrick
 

‘Tis in my memory lock’d, And you yourself shall keep the key of it.

 
 --William Shakespeare
 

It is an immutable law in business that words are words, explanations are explanations, promises are promises—but only performance is reality.

 
 --Harold S. Green

OBJECTIVES

In this chapter you’ll learn:

  • To search for a given value in a vector using binary search.

  • To use Big O notation to express the efficiency of an algorithm and to compare the performance of algorithms.

  • To review the efficiency of the selection sort and insertion sort algorithms. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ How to Program, 10/e

C++ How to Program, 10/e

Paul Deitel, Harvey Deitel
C++ How to Program, Ninth Edition

C++ How to Program, Ninth Edition

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9780136085669Purchase book