## Find pair of rows in a binary matrix that has maximum bit difference

Given a Binary Matrix. The task is to find the pair of row in the Binary matrix that has maximum bit difference Examples: Input: mat[][]… Read More »

- Sort the array of strings according to alphabetical order defined by another string
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Number of subarrays have bitwise OR >= K
- Count of words that are present in all the given sentences
- Count of strings whose prefix match with the given string to a given length k
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Lazy Propagation in Segment Tree | Set 2
- Range Queries to Find number of sub-arrays with a given xor
- Persistent Trie | Set 1 (Introduction)
- Longest string in an array which matches with prefix of the given string
- Program to implement Run Length Encoding using Linked Lists
- Queries for Composite numbers in subarray (With Point Updates)
- Introduction to R-tree
- Queries to update a given index and find gcd in range
- Find triplet such that number of nodes connecting these triplets is maximum
- Find a pair from the given array with maximum nCr value
- B-Tree Insert without aggressive splitting
- Find the number of different numbers in the array after applying the given operation q times
- Rearrange numbers in an array such that no two adjacent numbers are same
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Index of kth set bit in a binary array with update queries

Given a Binary Matrix. The task is to find the pair of row in the Binary matrix that has maximum bit difference Examples: Input: mat[][]… Read More »

Given a string of length n of lowercase alphabet characters, we need to count total number of distinct substrings of this string. Examples: Input :… Read More »

Given a matrix A of size NxN, we need to find the number of inversion pairs in it. Inversion count in a matrix is defined… Read More »

Given an array of integers, find the minimum (or maximum) element and the element just greater (or smaller) than that in less than 2n comparisons.… Read More »

Given a matrix of size M x N, there are large number of queries to find submatrix sums. Inputs to queries are left top and… Read More »

Like array and linked list, unrolled Linked List is also a linear data structure and is a variant of linked list. Unlike simple linked list,… Read More »

Let us consider the below problem statement and think of different solutions for it. Given a set S of elements such that the elements are… Read More »

Given a list of contacts which exist in a phone directory. The task is to implement search query for the phone directory. The search query… Read More »

Given an array arr[0..n-1]. The following operations need to be performed. update(l, r, val) : Add ‘val’ to all the elements in the array from… Read More »

Given a size n in which initially all elements are 0. The task is to perform multiple multiple queries of following two types. The queries… Read More »

Given an array arr[0 . . . n-1]. We need to efficiently find the minimum and maximum value from index qs (query start) to qe… Read More »

Given a dictionary of words where each word follows CamelCase notation, print all words in the dictionary that match with a given pattern consisting of… Read More »

Given an array of integers, evaluate queries of the form LCM(l, r). There might be many queries, hence evaluate the queries efficiently. LCM (l, r)… Read More »