Array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called one-dimensional array.

Learn more..Given an array of integers, find the maximum length of the sub-array having the given sum.
Example Solution
Let array arr equal to [ 5, 6, -5, 5, 3, 5, 3, -2, 0 ] and integer sum equal to 8.
Sub-a ...

Murat Sütunç

Published on Nov 16th, 2017

Published on Nov 16th, 2017

Given a limited range array of size n where array contains elements between 1 to n - 1 with one element repeating, find the duplicate number in this array.
Example Solution
Let array arr equal to [ ...

Murat Sütunç

Published on Nov 16th, 2017

Published on Nov 16th, 2017

Given an array of integers, check if the array contains a sub-array such that, when you add all the array members the summation is equal to zero.
Example Solution
Let array arr equal to [ 3, 4, -7, ...

Murat Sütunç

Published on Nov 16th, 2017

Published on Nov 16th, 2017

John is a clever salesman at Codeland and he fell into a debt stake and for this reason, he deciced to sell out secondhand cars but he needs your help to get highest profit. You are given an integer ...

Murat Sütunç

Published on Nov 1st, 2017

Published on Nov 1st, 2017

Given an array of integers, find largest sub-array formed by consecutive integers. The sub-array should contain all distinct values. Return the sub-array.
Example Solution
When the solution is call ...

Murat Sütunç

Published on Oct 13th, 2017

Published on Oct 13th, 2017

Given an binary array containing 0's and 1's, find the maximum length sub-array having equal number of 0's and 1's. Return the first sub-array.
Example Solution
When the solution is called with the ...

Murat Sütunç

Published on Oct 13th, 2017

Published on Oct 13th, 2017

Given an array of integers, find the maximum product of two integers in an array. Return the elements of this array. If there are more than one satifying answer, pick the pair whose sum is greater th ...

Murat Sütunç

Published on Oct 13th, 2017

Published on Oct 13th, 2017

Given an array of integers, move all zeros present in the array to the end. The solution should maintain the relative order of items in the array.
Example Solution
When the solution is called with ...

Murat Sütunç

Published on Oct 13th, 2017

Published on Oct 13th, 2017

Given an unsorted array of integers, find the first pair with given sum in it. Return the index for these integers.
Example Solution
When the solution is called with the following input arr = [8, 7, ...

Murat Sütunç

Published on Oct 4th, 2017

Published on Oct 4th, 2017