Viewing 1 to 2 of 2 items
Tag Archives: container

Binary Search in C++

Binary Search is a method to search through a sorted container in order to find a particular value. Remember that one “Guess the Number” game? Let’s look at the following scenario by applying the Binary Search algorithm in order for you to understand how Binary Search works. The Guessing Game Pick a number from 0  Full Article…

3

Simple Data Structure – The Vector

The vector is a simple data structure that allows you to store values with the same data type in one container. Introduction Without the use of a data structure, how would you store multiple variables? Let’s say we wanted to store 5 names into strings. How would this be done? string name1,name2,name3,name4,name5; cin >> name1  Full Article…

6