An open API service indexing awesome lists of open source software.

https://github.com/sumit-kr-das/data_structure_and_algo


https://github.com/sumit-kr-das/data_structure_and_algo

algorithms cpp data-structures

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

## STL

#### The functions associated with ```vector``` are:
- ```at()``` - It provides a reference to an element.
- ```back()``` - It gives a reference to the last element.
- ```front()``` - It gives a reference to the first element.
- ```swap()``` - It exchanges the elements between two vectors.
- ```push_back()``` - It adds a new element at the end.
- ```pop_back()``` - It removes a last element from the vector.
- ```empty()``` - It determines whether the vector is empty or not.
- ```insert()``` - It inserts new element at the specified position.
- ```erase()``` - It deletes the specified element.
- ```resize()``` - It modifies the size of the vector.
- ```clear()``` - It removes all the elements from the vector.
- ```size()``` - It determines a number of elements in the vector.

#### The functions associated with ```stack``` are:
- ```empty()``` – Returns whether the stack is empty – Time Complexity : O(1)
- ```size()``` – Returns the size of the stack – Time Complexity : O(1)
- ```top()``` – Returns a reference to the top most element of the stack – Time Complexity : O(1)
- ```push(g)``` – Adds the element ‘g’ at the top of the stack – Time Complexity : O(1)
- ```pop()``` – Deletes the top most element of the stack – Time Complexity : O(1)

# Tree
- Binary Tree Levelorder traversal
- Binary Tree Inorder traversal
- Binary Tree Preorder traversal
- Binary Tree Postorder traversal