Stock Buy and Sell – Multiple Transaction Allowed
The cost of stock on each day is given in an array price[]. Each day you may decide to either buy […]
The cost of stock on each day is given in an array price[]. Each day you may decide to either buy […]
You are given a string s consisting of the characters ‘a’, ‘b’, and ‘c’ and a non-negative integer k. Each minute, you may take either the leftmost character of s,
You are given an array of integer arr[] where each number represents a vote to a candidate. Return the candidates that have
You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the
Given an array of integers arr[] representing a permutation, implement the next permutation that rearranges the numbers into the lexicographically next greater permutation. If
You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length
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
You are given an array nums of non-negative integers and an integer k. An array is called special if the bitwise OR of all of its elements is at least k.
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.
You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 <= i < n –
Given an array arr[] such that each element is in the range [0 – 9], find the minimum possible sum of two
You are given a sorted array nums of n non-negative integers and an integer maximumBit. You want to perform the following query n times: Find a non-negative integer k <