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 …
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 …
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.
Given a permutation of numbers, print the immediate next lexicographically higher permutation.
Given an array with n elements, find any subarray whose sum is equal to zero.
Given an array with n elements. Find a contiguous sub array which has the highest product.