Go to the documentation of this file.
9 #include <bits/stdc++.h>
12 #define ll long long int
15 #define vi vector<int>
18 #define vll vector<ll>
97 bool deleteVal(
ll data);
103 void printer(
string sep);
183 void insert(
ll data);
189 void printer(
string sep);
265 void traverse(
BSTNode* T, order tt);
303 bool find(
Trie* T,
char c);
309 void insert(
string s);
316 bool checkPrefix(
string s);
323 ll countPrefix(
string s);
334 void swap(
int &x,
int &y);
391 void Heapify(
int root);
BSTNode * left
pointer to the left child
Definition: DSA.h:214
DoublyLinkedListNode * next
pointer to the next node
Definition: DSA.h:134
DoublyLinkedListNode * head
pointer to the head
Definition: DSA.h:169
Singly Linked List Node class. Available member functions include default constructor and initialisin...
Definition: DSA.h:29
ll data
data stored in the node
Definition: DSA.h:131
Trie class. Available member functions include default constructor, find, insert, checkPrefix and cou...
Definition: DSA.h:282
DoublyLinkedListNode * prev
pointer to the previous node
Definition: DSA.h:137
BSTNode * right
pointer to the right child
Definition: DSA.h:217
ostream & operator<<(ostream &out, const SinglyLinkedListNode &node)
Function to print a Singly Linked List Node.
Definition: DSA.cpp:17
BST Node class. Available member functions include initialising constructor.
Definition: DSA.h:203
map< char, Trie * > nodes
map/dictionary of nodes
Definition: DSA.h:290
order
types of traversals
Definition: DSA.h:247
SinglyLinkedListNode * head
pointer to the head
Definition: DSA.h:69
SinglyLinkedListNode * tail
pointer to the tail
Definition: DSA.h:72
Singly Linked List class. Available member functions include default constructor, insert,...
Definition: DSA.h:64
SinglyLinkedList merge(SinglyLinkedList list1, SinglyLinkedList list2)
Merge two sorted linked lists.
Definition: DSA.cpp:84
ll info
info stored in the node
Definition: DSA.h:208
ll data
data stored in the node
Definition: DSA.h:34
DoublyLinkedListNode * tail
pointer to the tail
Definition: DSA.h:172
Doubly Linked List class. Available member functions include default constructor, insert,...
Definition: DSA.h:164
void swap(int &x, int &y)
Swap function.
Definition: DSA.cpp:331
#define ll
long long int macro
Definition: DSA.h:12
BinarySearchTree class. Available member functions include default constructor, insert,...
Definition: DSA.h:239
Doubly Linked List Node class. Available member functions include default constructor and initialisin...
Definition: DSA.h:126
ll level
level of the node
Definition: DSA.h:211
ll count
count of the string from root to leaf
Definition: DSA.h:287
SinglyLinkedListNode * next
pointer to the next node
Definition: DSA.h:37
BSTNode * root
pointer to the root
Definition: DSA.h:244