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
- Host: GitHub
- URL: https://github.com/sumit-kr-das/data_structure_and_algo
- Owner: sumit-kr-das
- Created: 2022-06-27T19:50:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T20:48:05.000Z (about 2 years ago)
- Last Synced: 2025-04-12T16:20:02.161Z (about 2 months ago)
- Topics: algorithms, cpp, data-structures
- Language: C++
- Homepage:
- Size: 852 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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