Problem Statement: Given an array of size N. Find the highest and lowest frequency element. Pre-requisite: Hashing Theory and Counting
Continue readingTag: DSA Self Paced
Heap Sort
Heap sort is a sorting algorithm that sorts data in ascending or descending order using the input data. It is
Continue readingLexicographic Rank of a String
Problem Statement: You are given a string, find its lexicographical rank among all its permutations. Example: Example 1: Input: S
Continue readingTwo stacks in an array
Problem Statement: You need to try implementing 2 stacks in a single array. Example: push1(10): Insert 10 in stack1 push2(21):
Continue readingBuildHeap(), DecreaseKey(), and Delete() in Binary Heap
Problem statement: Given a Binary Heap, perform the operations Delete() , Decreasekey() and BuildHeap(). Disclaimer: Don’t jump directly to the
Continue readingBinary Heap Heapify and Extract Min
Problem statement : Given a Binary Heap, Implement Hepify() and ExtractMin() operations on Binary Heap. Disclaimer: Don’t jump directly to
Continue readingInsert in Binary Heap
Problem Statement: Given a Binary Heap, Insert the new value in the Binary Heap. Solution : Disclaimer: Don’t jump directly
Continue readingBinary Heap Implementation
Binary Heap: A Binary Heap is a Binary Tree that satisfies the following conditions. It should be a Complete Binary
Continue readingSpiral Traversal of Matrix
Problem Statement: Given a Matrix, print the given matrix in spiral order. Examples: Example 1: Input: Matrix[][] = { {
Continue readingPrefix Sum Technique
In an array of integers n, the prefix sum array is the array whose every element is the sum of
Continue reading