Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
|
Definition for a templated ArrayQueue class with fixed capacity. More...
Data Structures | |
class | ArrayQueue |
class | queue |
A simplified version of the STL queue class. More... | |
class | stack |
A simplified version of the STL stack class. More... | |
Functions | |
bool | is_matched (const std::string &expression) |
bool | is_html_matched (const std::string &html) |
template<typename T > | |
void | reverse (T data[], int n) |
Definition for a templated ArrayQueue class with fixed capacity.
Code from the chapter "Stacks, Queues, and Deques".
bool dsac::stackqueue::is_html_matched | ( | const std::string & | html | ) |
Tests if every opening tag has a matching closing tag in HTML string.
html | a string representing the html source |
bool dsac::stackqueue::is_matched | ( | const std::string & | expression | ) |
Tests if delimiters in the given expression are properly matched.
expression | a character string |
void dsac::stackqueue::reverse | ( | T | data[], |
int | n | ||
) |
Reverses the contents of the given array.
data | an array of elements |
n | length of the array |