42. Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap […]
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap […]
Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums. You must implement an algorithm that runs in O(n) time and
A matrix is constructed of size n*n and given an integer ‘q’. The value at every cell of the matrix is given as, M(i,j)
Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input:
Given a string str, the task is to find the bracket numbers, i.e., for each bracket in str, return i if the bracket
Given an array of integers nums and an integer limit, return the size of the longest non-empty subarray such that the absolute difference between any
Given a sentence containing several words and numbers. Find the largest number among them which does not contain 9. If no
Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice sub-arrays.
There is a bookstore owner that has a store open for n minutes. Every minute, some number of customers enter the store.
You are given a string str containing two fractions a/b and c/d, compare them and return the greater. If they are equal,
In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put
Given three non-collinear points whose co-ordinates are p(p1, p2), q(q1, q2) and r(r1, r2) in the X-Y plane. Return the number of integral / lattice