Amazon as all other companies doesn’t share information about the tasks they use during their interviewing process. But internet is full of lists of the tasks which collecting the people who participating in the interview. IMHO the most comprehensive and the most actual list is collected here. So I decided…


Some time ago I found on Codility website a wonderful set of training tasks which covers many subjects of questions using by big companies on interview. Codility calls this set of tasks the “Lessons”. Each lesson has a link to a PDF file with theoretical description subject of the lesson…


Microsoft, as all other companies, doesn’t share information about the tasks they use during their interviewing process. But internet is full of lists of the tasks which collecting the people who participating in the interview. IMHO the most comprehensive and the most actual list is collected here.

So I decided…


Description:

Solution:

It looks like this task is not about algorithms, this is just about writing a simple parser which breaking the given string to parts and writing a function which finds and counts all substrings in the given string.

The only interesting subject which can be discussed in this task is…


Description:

Give you one sorted array, please put them into n buckets, we need to ensure we get n sub array with approximately equal weights.

Example:

input {1, 2, 3, 4, 5} n = 3

output [[5],[1,4],[2,3]];

Solution:

Generally this task look like a typical partition problem https://en.wikipedia.org/wiki/Partition_problem

Unfortunately this description looks…


Description:

Related problems:

Solution:

This task is very simple. We just need go through the given array and check that the difference between three simultaneous items is equal. For example in array 1, 2, 3 the difference between 1 and 2 and between 2 and 3 is 1. That is…


Description:

We are given a string S of length N consisting only of letters ‘A’ and/or ‘B’. Our goal is to obtain a string in the format “A…AB…B” (all letters A’ occur before all letters ‘B’) by deleting some letters from S. …


Description:

Given an integer n, return any array containing n unique integers such that they add up to 0.

Example 1:

Input: n = 5
Output: [-7,-1,1,3,4]
Explanation: These arrays also are accepted [-5,-1,1,2,3], [-3,-1,2,-2,4].

Example 2:

Input: n = 3
Output: [-1,0,1]

Example 3:

Input: n = 1
Output: [0]


Description:

There are N balls positioned in a row. Each of them is either red or white. In one move we can swap two adjacent balls. We want to arrange all the red balls into a consistent segment. What is the minimum number of swaps needed?

Write a function:

int solution(string…


Description:

Alexa is given n piles of equal or unequal heights. In one step, Alexa can remove any number of boxes from the pile which has the maximum height and try to make it equal to the one which is just lower than the maximum height of the stack. …

Alexander Molchevskyi

Looking for an interesting project to join. https://www.linkedin.com/in/molchevsky/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store