Adhoc

Island Perimeter

Island Perimeter Companies: Amazon, Facebook, Google You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island Island Perimeter

Find largest perimeter of a triangle

Find largest perimeter of a triangle | Largest Perimeter Triangle | Leet Code Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths. If it is impossible to form any triangle of non-zero area, return 0. Example 1: Input: [4,6,3] Output: 13 Find largest perimeter of a triangle

Product of all numbers except self

Given an array of n integers, for each position print the product of all numbers except for number at that position. without using division operator.

Find next permutation

Given a permutation of numbers, print the immediate next lexicographically higher permutation.

Zero sum subarray

Given an array with n elements, find any subarray whose sum is equal to zero.

Maximum product subarray

Given an array with n elements. Find a contiguous sub array which has the highest product.

[gravityforms id="5" description="false" titla="false" ajax="true"]