red black tree Red Black Tree: Insertion We will explore the insertion operation on a Red Black tree in the session. Inserting a value in Red Black tree takes O(log N) time complexity and O(N) space complexity. A red–black tree is a kind of self-balancing binary search tree in computer science.
red black tree Red Black Tree: Search We will explore the search operation on a Red Black tree in the session. Searching in Red Black tree takes O(log N) time complexity and O(N) space complexity. A red–black tree is a kind of self-balancing binary search tree in computer science.
Algorithms Welsh Powell Algorithm for graph coloring in O(N^2) time Welsh Powell algorithm is used to implement graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints
Algorithms The Coin Change Problem Given a set of coins S with values { S1, S2, ..., Sm }, find the number of ways of making the change to a certain value N. There is an infinite quantity of coins and the order of the coins doesn't matter. This real life problem can be solved by Dynamic Programming in
Dynamic Programming (DP) Box stacking Problem Given a set of n types of 3D rectangular boxes, find the maximum height that can be reached stacking instances of these boxes. This problem can be solved efficiently by using Dynamic programming in O(N^2) time complexity and linear O(N) space complexity.
Dynamic Programming (DP) 0-1 Knapsack Problem (Integral Knapsack) Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Brute force approach will take exponential time while a dynamic programming approach will take linear time.
String Algorithms Algorithm to find the maximum occurring character in a string Algorithm Pseudocode Complexity Implementation Applications Reading time: 15 minutes | Coding time: 5 minutes One approach to solve this problem would be to sort the input string and then traverse through the sorted string
Problems on Binary Tree Properties of a Binary Tree properties of Binary Tree are as follows: The maximum number of nodes at level ‘L’ of a binary tree is 2L-1, Maximum number of nodes in a binary tree of height ‘H’ is 2H – 1, In a Binary Tree with N nodes, minimum possible height or minimum number of levels is ⌈ Log2(N+1) ⌉
nash equilibrium Nash Equilibrium Algorithm Complexity Implementations Applications: Tinder questions Reading time: 25 minutes | Coding time: 10 minutes In game theory, the Nash equilibrium, named after American mathematician John Forbes Nash Jr., is a solution concept of
convex hull Kirkpatrick-Seidel Algorithm (Ultimate Planar Convex Hull Algorithm) Algorithm Complexity Applications Reading time: 15 minutes | Coding time: 9 minutes The Kirkpatrick–Seidel algorithm, called by its authors "the ultimate planar convex hull algorithm", is an algorithm for computing the
linked list Sort a Linked List which is already sorted on absolute values Algorithm Example Complexity Implementations Questions Reading time: 15 minutes | Coding time: 5 minutes The problem at hand is to sort a singly Linked List which is already sorted on absolute value. Sorting always
linked list Merge Sort a singly Linked List Algorithm Complexity Implementations Questions Merge sort is a fast comparison based sorting algorithm which can be utilized in sorting a Linked List as well. Merge Sort is preferred for sorting a linked list.
linked list Insertion Sort a Linked List Algorithm Pseudocode Complexity Implementations Questions Reading time: 15 minutes | Coding time: 20 minutes Insertion sort is a comparison based sorting algorithm which can be utilized in sorting a Linked List as well. Insertion
linked list Insert element in a sorted Linked List Pseudocode Implementations Complexity Can binary search be used to improve performance? Reading time: 15 minutes | Coding time: 20 minutes In this session, we will explore how to insert an element in a sorted
linked list Deletion operation in a Linked List How to delete a node? Delete first node Delete last node Pseudocode Implementations Complexity Reading time: 15 minutes | Coding time: 20 minutes Linked List is an efficient data structure to store data. You
linked list Insertion operation in a Linked List How to insert a node at front? Insert a node at a particular location How to insert a node at end? Implementations Complexity Reading time: 15 minutes | Coding time: 20 minutes Linked List
linked list Search an element in a Linked List How to search a node? Why is searching in Linked List slower than arrays? Is binary search possible in Linked List? Implementations Complexity Reading time: 15 minutes | Coding time: 20 minutes Linked List
Data Structures Singly Linked List Singly Linked List is a variant of Linked List which allows only forward traversal of linked lists. This is a simple form yet it is effective for several problems such as Big Integer calculations. We will look into how various operations are performed and the advantages and disadvantages
game theory Zobrist Hashing Algorithm Complexity Implementations Applications Questions Reading time: 15 minutes | Coding time: 5 minutes Zobrist hashing (additionally alluded to as Zobrist keys or Zobrist marks ) is a hash function development utilized as a part
game theory Alpha Beta Pruning in Minimax Algorithm Algorithm Complexity Implementations Applications Questions Reading time: minutes | Coding time: minutes Like we discussed in earlier article, a hard coded AI can be used to create an intelligent opponent which you can challenge
game theory Von Neumann's Minimax Theorem/ algorithm Introduction Algorithm Complexity Implementations Applications Questions Reading time: 25 minutes | Coding time: 10 minutes Ever since the idea of artificial intelligence dawned upon the humanity, the basic concept of playing games against an
bitwise operation Detect if a number is power of 4 using bitwise operators Reading time: 15 minutes | Coding time: 2 minutes Algorithm Implementation Complexity Questions Bitwise operators are one of the most under-rated operators in C/C++, despite being quite fast as most of the
bitwise operation Check if Two Numbers are Equal using Bitwise Operators Bitwise Operators Explanation Implementations Applications Reading time: 15 minutes | Coding time: 2 minutes In this article, we will explore the technique of checking whether two numbers are equal using bitwise operators. Bitwise operator
bitwise operation Detect if a number is power of 2 using bitwise operators Reading time: 15 minutes | Coding time: 1 minutes Algorithm Implementation Complexity Questions Bitwise operators are one of the most under-rated operators in C/C++, despite being quite fast as most of the
bitwise operation Basic Bitwise Operations: AND, OR, XOR, NOT, LEFT and RIGHT SHIFT Reading time: 15 minutes Bitwise AND (&) Bitwise OR (|) Bitwise XOR (^) Bitwise Unary NOT (~) Left Shift (<<) Right Shift (>>) It is a well-known fact that computers do not interpret