Kth element in Matrix
Given a matrix mat[][] of size n*n, where each row and column is sorted in non-decreasing order. Find the kth smallest element in the matrix. Examples: […]
Given a matrix mat[][] of size n*n, where each row and column is sorted in non-decreasing order. Find the kth smallest element in the matrix. Examples: […]
You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in a Boustrophedon style starting from the bottom left of the
You are given a binary tree, and the task is to determine whether it satisfies the properties of a max-heap.
You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions: The minimum value in the
Given an array arr[]. Find the majority element in the array. If no majority element exists, return -1. Note: A majority element in an array
You are given a 0-indexed integer array nums, an integer modulo, and an integer k. Your task is to find the count of subarrays that
Given an array of integers arr[] where, every element appears thrice except for one which occurs once.Find that element which occurs once. Examples: Input: arr[] = [1, 10, 1, 1]
You are given an array nums consisting of positive integers. We call a subarray of an array complete if the following condition is satisfied: The number
Given an array arr[] containing 2*n + 2 positive numbers, out of which 2*n numbers exist in pairs whereas only two number occur exactly once and
You are given an integer n. Each number from 1 to n is grouped according to the sum of its digits. Return the number of groups
Given a unsorted array arr[] of positive integers having all the numbers occurring exactly twice, except for one number which will occur only once. Find the number
You are given two integers n and maxValue, which are used to describe an ideal array. A 0-indexed integer array arr of length n is considered ideal if the following conditions hold: Every arr[i] is