Amazon.com, Inc., doing business as Amazon, is an American electronic commerce and cloud computing company based in Seattle, Washington that was founded by visionary Jeff Bezos on July 5, 1994. The tech giant is the largest Internet retailer in the world as measured by revenue and market capitalization, and second largest after Alibaba Group in terms of total sales.

Learn more..

Find Maximum of Minimums in Sliding Windows

Given an integer array of size n, find the maximum of the minimum’s for every window size in the array. Note that window size is 1..n. Example: When arr = [10, 20, 30, 50, 10, 70, 30], the output s ...
Berkan Teber
Published on Jan 16th, 2018

Form Minimum Number From a Given Sequence

Given a pattern containing only Is and Ds, I for increasing and D for decreasing, devise an algorithm to print the minimum number following that pattern. Digits are 1..9 and can’t repeat. Examples: ...
Berkan Teber
Published on Jan 16th, 2018

Find An Equal Point In a String of Brackets

Given a string of brackets, the task is to find an index k which decides the number of opening brackets is equal to the number of closing brackets. The string must consist of only opening and closing ...
Berkan Teber
Published on Jan 16th, 2018

Number of Buildings Facing Sun

Given an array representing heights of buildings, the array has buildings from left to right. Count number of buildings facing the sunset. It is assumed that heights of all buildings are distinct. E ...
Berkan Teber
Published on Jan 16th, 2018

Second Most Repeated Word In a Sequence

Given a sequence of strings, the task is to find out the second most repeated (or frequent) string in the given sequence. Example: ["aaa", "bbb", "ccc", "bbb", "aaa", "aaa"] should return "bbb".
Berkan Teber
Published on Jan 16th, 2018

Maximum Sum of Lengths of Non-Overlapping Subarrays with k as Max Element.

Find the maximum sum of lengths of non-overlapping subarrays (contiguous elements) with k as the maximum element of each subarray. Examples: arr = [2, 1, 4, 9, 2, 3, 8, 3, 4]and k = 4 should return ...
Berkan Teber
Published on Jan 16th, 2018

Check If Two Expressions Are Same

Given two expressions in the form of strings, the task is to compare them and check if they are the same. Expressions consist of lowercase alphabets, '+', ‘'-' and '( )'. Examples: "-(a+b+c)"and "- ...
Berkan Teber
Published on Jan 16th, 2018