## Count of words that are present in all the given sentences

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

- Find maximum in a stack in O(1) time and O(1) extra space
- Fibonacci Heap - Insertion and Union
- Sort the array of strings according to alphabetical order defined by another string
- Some Basic Theorems on Trees
- Number of subarrays have bitwise OR >= K
- Counting inversions in an array using segment tree
- Count of words that are present in all the given sentences
- Range Sum Queries and Update with Square Root
- Optimal sequence for AVL tree insertion (without any rotations)
- Range and Update Sum Queries with Factorial
- Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
- Range queries to count 1s in a subarray after flip operations
- Queries for Composite numbers in subarray (With Point Updates)
- Program to implement Run Length Encoding using Linked Lists

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

Given a Linked List as the input. The task is to encode the given linked list using Run Length Encoding. That is, to replace a… Read More »

Given an array arr[] and an integer K, the task is to count the number of sub-arrays having bitwise OR ≥ K. Examples: Input: arr[]… Read More »

Given an array of N integers, the task is to perform the following two operations on the given array: query(start, end) : Print the number… Read More »

Given a string str and an array of strings strArr[], the task is to sort the array according to the alphabetical order defined by str.… Read More »

Given an array arr[] of N integers and number of queries Q. The task is to answer three types of queries. Update [l, r] –… Read More »

Given an array A of N integers and number of queries Q. You have to answer two types of queries. Update [l, r] – for… Read More »

Given two numbers x, y which denotes the number of set bits. Also given is a number C. The task is to print the number… Read More »

Given an array of integers arr, the task is to count the number of inversions in the array. If A[i] > A[j] and i <… Read More »

Tree:- A connected graph without any circuit is called a Tree. In other words, a tree is an undirected graph G that satisfies any of… Read More »

Given an array ‘arr’ all the numbers of which are initialized to ‘0’ then the array can be updated at any time in the following… Read More »

Given an array of integers, the task is to find the sequence in which these integers should be added to an AVL tree such that… Read More »

Prerequisites:Fibonacci Heap (Introduction) Fibonacci Heap is a collection of trees with min-heap or max-heap property. In Fibonacci Heap, trees can can have any shape even… Read More »

Given a stack of integers. The task is to design a special stack such that maximum element can be found in O(1) time and O(1)… Read More »

2-3 tree is a tree data structure in which every internal node (non-leaf node) has either one data element and two children or two data… Read More »