Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the … Read More
Given an array A of N positive integer values. A sub-array of this array is called Odd-Even sub-array if the number of odd integers in this sub-array is equal to the number of even integers … Read More
Given two arrays A and B of equal size, you have to determine whether the following the sequence is possible or not.
Problem Statement of Subset Sum Dynamic Programming
Given a set T containing a list of integers and a sum S, does a subset of T exists whose sum is equal to S.
NOTE – Subset … Read More
Given an Array A with n integers both positive and negative, find the maximum sum contiguous subarray within A which has the largest sumRead More
Find the first circular tour that visits all petrol pumps
Rectangular chocolate bar Create at least one piece which consists of exactly nTiles tiles.
You have a rectangular chocolate bar that consists of width x height square tiles. You can split it into two rectangular … Read More