Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Data Structures | Functions
dsac::array Namespace Reference

Code from the chapter "Array-Based Structures". More...

Data Structures

class  CaesarCipher
 Class for doing encryption and decryption using the Caesar Cipher. More...
 
class  GameEntry
 A representation of an entry on a scoreboard. More...
 
class  Scoreboard
 Class for storing high scores ordered within an array. More...
 
class  TicTacToe
 Maintains the state of a game of Tic-Tac-Toe. More...
 
class  Vector
 dynamically sized array, as simplified version of std::vector More...
 

Functions

ostream & operator<< (ostream &os, const GameEntry &ge)
 Inserts string representation of the entry to the output stream.
 
template<typename T >
void insertion_sort (T data[], int n)
 
ostream & operator<< (std::ostream &os, const Scoreboard &sb)
 Inserts string representation of the entry to the output stream.
 

Detailed Description

Code from the chapter "Array-Based Structures".

Function Documentation

◆ insertion_sort()

template<typename T >
void dsac::array::insertion_sort ( data[],
int  n 
)

Sorts an array of n elements. Elements must be comparable with < operator

Parameters
dataan array of elements
nthe length of the array

◆ operator<<() [1/2]

std::ostream & dsac::array::operator<< ( ostream &  os,
const GameEntry ge 
)

Inserts string representation of the entry to the output stream.

Here is the call graph for this function:

◆ operator<<() [2/2]

std::ostream & dsac::array::operator<< ( ostream &  os,
const Scoreboard sb 
)

Inserts string representation of the entry to the output stream.

Here is the call graph for this function: