Data Structures

Binary Search Trees are trees where keys of the nodes follow a specific order. All the keys in the left of any node are always smaller and on right are always larger. For a balanced BST the upper bound on complexity of most  ( insertion/deletion/search ) of the operations is O(log n ).  If the BST is not balanced , it can be O(n).  So balancing the BST is very important.

Red-Black Trees and AVL trees are both balanced BSTs.  They just follow different types of rules.  AVL trees are more balanced than Red Black Trees but they may cause more rotations during insertion/deletion. So if there are more of those operations happening Red Black trees  should be preferred over AVL.


Matrix * Inverse Matrix = Identify Matrix ( A matrix which has everything else 0 except diagonal values set to 1s).

The transpose of a matrix is a new matrix whose rows are the columns of the original. 

Shortest Path from a source node to all nodes in a graph (dijkstras)  :  https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/



Comments

Popular posts from this blog

SQL

Analytics

DBeaver