Home arrow Practices arrow Basic Array Searching in C++

Basic Array Searching in C++

Searching arrays for a particular value is a common activity that any programmer should know how to do. Bryan Roth discusses two basic searching methods, sequential and binary, and shows how to code them in C++.

TABLE OF CONTENTS:
  1. Basic Array Searching in C++
  2. Sequential Search
  3. Binary Search
  4. Coding a Binary Search
By: Bryan Roth
Rating: starstarstarstarstar / 47
December 27, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Searching is a very useful operation within the C++ language and any other programming language. Searching is especially useful with arrays. Searching is used daily on the Internet, with surfers using search engines like Google.

Performance is a must with search engines. There are also many ways you can take advantage of searching, like trying to locate a certain transaction number within a large database, finding a certain item located in an inventory database, implementing searching methods within a library catalog, and the list can go on and on. 

Within this article two basic searching methods will be introduced and discussed. These two methods are the sequential search and the binary search. Each searching method has its pros and cons, which will be listed after each explanation.

It is essential to know these two types of searching and how they perform before moving on to more advanced searching methods. With each searching method walkthrough there will be an example followed by an implementation of the example to give you a better understanding of how each searching method works.



 
 
>>> More Practices Articles          >>> More By Bryan Roth
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PRACTICES ARTICLES

- Calculating Development Project Costs
- More Techniques for Finding Things
- Finding Things
- Finishing the System`s Outlines
- The System in So Many Words
- Basic Data Types and Calculations
- What`s the Address? Pointers
- Design with ArgoUML
- Pragmatic Guidelines: Diagrams That Work
- Five-Step UML: OOAD for Short Attention Span...
- Five-Step UML: OOAD for Short Attention Span...
- Introducing UML: Object-Oriented Analysis an...
- Class and Object Diagrams
- Class Relationships
- Classes

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: