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.

#### Sort an Array with Swapping Only with a Special Character

Given an array of length n + 1, containing elements 1..n and a special character 999 , write a function that sorts the array using only swaps with the special character. In other words, you can only ...
Berkan Teber
Published on Jan 15th, 2018

#### Top 10 Watch Rates

Given lists N and R, video names and their watch rates, write a function that will return the videos with the top 10 watch rates. Video names may appear more than once. Example: N = ["abc", "def", ...
Berkan Teber
Published on Jan 15th, 2018

Problem Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example Given "25525522235", return ["255.255.222.35", "255.255.22.235"]. (Orde ...
Erkan Ercan
Published on Jan 14th, 2018

#### Return the Sum Except 6-7

Problem Return the sum of the numbers in the array, except ignore sections of numbers starting with a 6 and extending to the next 7 (every 6 will be followed by at least one 7). Example solution([ ...
Erkan Ercan
Published on Jan 12th, 2018

#### Blow Out Birthday Cake Candle!

Colleen is turning n years old! Therefore, she has n candles of various heights on her cake, and candle i has height heighti . Because the taller candles tower over the shorter ones, Colleen can on ...
Erkan Ercan
Published on Jan 10th, 2018

#### Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than floor(n/2) times. You may assume that the array is non-empty and the majority element ...
Murat Sütunç
Published on Jan 4th, 2018

#### Search an element in a sorted and rotated array

An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array at some pivot unknown to you beforehand. So for instance, [ 1, 2, 3 ...
Murat Sütunç
Published on Jan 4th, 2018

#### Lowercase Uppercase Convert

Text with a maximum of 100 characters will be given. Convert upper case letters to lower case letters and lower case letters to upper case letters. Example Solution Let string str equal to "coDeLAp ...
Hamit Can Uzunay
Published on Dec 26th, 2017

#### Divisibility Test

Write the function code that finds the average of the numbers divisible by 11 in the given array. Example Solution Let array arr equal to [ 10, 21, 246, 33, 47, 44, 99 ]. Divisions are: 33 , 44 , 9 ...
Hamit Can Uzunay
Published on Dec 24th, 2017

#### Divisible Rules

Write a program which will find all such numbers which are divisible by 2 but are not a multiple of 5, between 2500 and 4000 (both included). The numbers obtained should be printed in a comma-separa ...
Fatih Zor
Published on Dec 20th, 2017