Subarray range with given sum
Given an unsorted array of integers arr[], and a target tar, determine the number of subarrays whose elements sum up to the […]
Given an unsorted array of integers arr[], and a target tar, determine the number of subarrays whose elements sum up to the […]
You are given a 0-indexed integer array nums and an integer k. You have a starting score of 0. In one operation: choose an index i such that 0 <= i <
Given a singly linked list. The task is to find the length of the linked list, where length is defined
You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists. We define
Given a Singly Linked List, Delete all alternate nodes of the list ie delete all the nodes present in even positions. Examples
You are given a 2D integer array intervals where intervals[i] = [lefti, righti] represents the inclusive interval [lefti, righti]. You have to divide the intervals into one
Given an array of integers arr, the task is to find and return the maximum sum of the smallest and second smallest element among all possible subarrays
There is a party where n friends numbered from 0 to n – 1 are attending. There is an infinite number of chairs in this party that are
Given an array of elements arr[] with indices ranging from 0 to arr.size() – 1, your task is to write a program that rearranges the elements
A ramp in an integer array nums is a pair (i, j) for which i < j and nums[i] <= nums[j]. The width of such a ramp is j – i. Given
Given an array arr[] with repeated elements, the task is to find the maximum distance between two occurrences of an element. Note: You
A parentheses string is valid if and only if: It is the empty string, It can be written as AB (A concatenated with B),