## The most asked programming interview questions - #3

Sort an array of size N made of numbers from 0 to K Problem statement In this article we will be discussing another (see the previous article) very popular programming interview question. This time we are asked to sort an array of size N whose elements are in the range [0,K). Problem statement Given an array $A=[a_1,a_2,…a_n],\: 1 \leq a_i \leq K$ modify A s.t. it is sorted. As usual you should ask your interviewer some clarifying questions. For example a sensible question to ask could be: What is the maximum value of $K$ and of $N$? Let's assume that $N \leq 10^7$ and $K\leq… Read More »The most asked programming interview questions - #3