Standard Library
What is that?
C++ Standard Library is a collection of classes and functions
C++ Standard Library are declared within the std namespace
The C++ standard consists of two parts:
The core language and the standard library.
Latter includes aggregate types (vectors, lists, maps, sets, queues, stacks, arrays, tuples), algorithms (find, for_each, binary_search, random_shuffle, etc.), input/output facilities (iostream, for reading from and writing to the console and files) ,etc.
- Library-based binary trees are available.
- For Containers, this can be referred to the map
- Map container is a binary tree, that uses an algorithm to be balance (on the slides, I do not know what is that used for)
Maps :
- Are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order.
- Maps are typically implemented as binary search trees.
Link List:
- What is that ?
A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations.
a linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the list.
- How to create?
typedef struct student
{
int data; //结点中的数据
struct student *next; //指向链表下一个结点的指针
}node;
node *head; //头结点指针