first step is programming aptitude which was held by codechef. Practice sums from codechef very well, that will help you to understand the questions during test. After solving at least one sum you will be redirected to next round . The difficulty level of sums was intermmidiate.
Perguntas de entrevista [1]
Pergunta 1
Two programming questions will be ask you have to solve it within 90 minutes
Fiz uma entrevista na empresa Media.net (Ulhasnagar).
Entrevista
Two code were given ! We have to do this on code chef !
Following were the two programs :-
There are N boxes and N balls. Each of the box and the ball has a number printed on it within the range 0 to (N-1). These balls are randomly put into the boxes one ball in each box in no particular order. There is one extra box with no number printed on it.
Moving one ball at a time you are expected to correct the order of these balls such that ith ball goes in ith box. you can use the extra empty box that is provided. When you pick any ball it has to go in some box before you pick other ball.
Input
An integer T denoting the number of test cases.
For each test cases there are 2 lines.
The first line cointans a single integer N where N denotes the number of balls.
The second line contains N integers K0 to KN-1 where Ki represents the number marked on the ball in the ith box in the initial configuration.
Output
For each test output a single integer M, where M is the number of balls moves required to arrange all the balls to their proper location.
Example
Input:
2
3
1 0 2
4
2 1 3 0
Output:
3
4
Given a sequence of n distinct elements, convert the given sequence to a form where all elements are in range from 0 to n-1. The order of elements is same, i.e., 0 is placed in place of smallest element, 1 is placed for second smallest element, n-1 is placed for largest element.
Input
First line contains the number of elements in the sequence i.e. n.
Second line contains n space separated elements that makes the sequence.
OUTPUT
Print n space separated ranks for the elements of the sequence.
Test case 1:
Input:
3
10 40 25
Output:
0 2 1
Test case 2:
Input:
6
5 11 40 21 5 7
Output:
0 2 4 3 0 1