Category Archives: Data structures and Algorithms

What is Red-Black Tree?

In this post, we will talk about What is Red-Black Tree? Red-Black Tree is usually a self-balancing Binary Search Tree (BST), In red-black trees, each node is associated with an extra attribute:  the color, which is either red or black. To get logarithmic complexity we impose the following restrictions.  Root Property: The root is black External… Read More »

Classification of Sorting Algorithms

In this post, we will talk about different Classification of Sorting Algorithms. Classification of Sorting Algorithms: By Number of Comparisons In this method, Sorting algorithms are usually classified based on the number of comparisons. For comparison-based sorting algorithms best-case behavior is O(n log n) and worst-case behavior is O(n2). Comparison-based sorting algorithms evaluate the elements of… Read More »