Maximum Product Subarray
Given an array arr[] that contains positive and negative integers (may contain 0 as well). Find the maximum product that we can get in […]
Given an array arr[] that contains positive and negative integers (may contain 0 as well). Find the maximum product that we can get in […]
Given an array prices[] of length n, representing the prices of the stocks on different days. The task is to find the
The cost of stock on each day is given in an array price[]. Each day you may decide to either buy
You are given an array of integer arr[] where each number represents a vote to a candidate. Return the candidates that have
Given an array of integers arr[] representing a permutation, implement the next permutation that rearranges the numbers into the lexicographically next greater permutation. If
Given an unsorted array arr[]. Rotate the array to the left (counter-clockwise direction) byd steps, where d is a positive integer. Do the mentioned change in
Given two sorted arrays a[] and b[], where each array contains distinct elements , the task is to return the elements in the union of the two arrays in sorted order.
Given an array arr[] such that each element is in the range [0 – 9], find the minimum possible sum of two
Given two strings s1 and s2. Return a minimum number of times s1 has to be repeated such that s2 is a substring of
Given anarray, arr[], determine if arr can be split into three consecutive parts such that the sum of each part is equal. If possible,
Given a binary tree, where every node value is a number. Find the sum of all the numbers that are
Given asquare matrix[][]. The task is to rotate it by 90 degrees in clockwise direction without using any extra space. Examples: Input: mat[][]