Search in a Row-Column sorted matrix
Given a 2D integer matrix mat[][] of size n x m, where every row and column is sorted in increasing order and […]
Given a 2D integer matrix mat[][] of size n x m, where every row and column is sorted in increasing order and […]
You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n – 1]. We
Given a sorted array of distinct positive integers arr[], we need to find the kth positive number that is missing from arr[]. Examples
You are given an integer array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items
You are given an array arr[] of integers, where each element arr[i] represents the number of pages in the ith book. You also have
You are given a string s and an integer repeatLimit. Construct a new string repeatLimitedString using the characters of s such that no letter appears more than repeatLimit times in a
You are given an array with unique elements of stalls[],which denote the position of a stall. You are also given an
Given two sorted arrays a[] and b[] and an element k, the task is to find the element that would be at the kth position of the
There is a school that has classes of students and each class will be having a final exam. You are
Given an array arr[] where no two adjacent elements are same, find the index of a peak element. An element is considered to be a peak if it
You are given a 0-indexed integer array nums. A subarray of nums is called continuous if: Let i, i + 1, …, jbe the indices in the subarray. Then, for
You are given a 0-indexed array nums and a non-negative integer k. In one operation, you can do the following: Choose an index i that hasn’t been chosen before from the