DATA STRUCTURE


Construction of an Expression Tree

Construction of an Expression Tree

Problem Given a postfix expression, the task is to generate an expression tree from it and retur…

Count Inversions

Count Inversions

Problem Given an array of integers, count the number of inversions present in it. An inversion i…

Find minimum and maximum with minimum number of comparisons

Find minimum and maximum with minimum number of comparisons

Problem Given an array of integers, find the minimum and maximum elements in it with a minimum n…

Problems solved using partitioning logic of Quicksort

Problems solved using partitioning logic of Quicksort

Problem What are some of the problems that can be solved using the partition logic of quicksort?…

In-place vs out-of-place algorithms

In-place vs out-of-place algorithms

In-Place algorithms This is a category of the algorithms that do not consume any extra space in …

Sort elements by their frequency and index

Sort elements by their frequency and index

Problem  Given an array of integers, sort them by their frequencies. If two elements have t…

Quicksort using Dutch National Flag Algorithm

Quicksort using Dutch National Flag Algorithm

Problem Implement Quicksort using Dutch National Flag Algorithm What’s the issue with t…

Hybrid QuickSort Algorithm

Hybrid QuickSort Algorithm

Problem Implement hybrid quicksort algorithm What is a hybrid algorithm? In a hybrid techn…

Difference Between Git Merge and Git Merge --no-ff

Difference Between Git Merge and Git Merge --no-ff

Today, Git is widely adopted as a version control system. It is used for the efficient management o…

Find maximum sum path involving elements of given arrays

Find maximum sum path involving elements of given arrays

Problem Given two sorted arrays, where the arrays may share some elements. Find the largest sum …

Reverse every consecutive m-elements of a subarray

Reverse every consecutive m-elements of a subarray

Problem Given an array, reverse every sub-array formed by consecutive m elements. Sample Inpu…

Maximum Product Subset Problem

Maximum Product Subset Problem

Problem Given array a, we have to find the maximum product possible with the subset of elements …