Nagarro - General - other Father angel school, Delhi

advertisement
Nagarro - General - other Father angel school, Delhi - 9
February 2008
Read paper online at
http://www.yuvajobs.com/placement_paper/paper_t.asp?pn=1344
Following paper is provided by YuvaJobs.com . Visit
http://www.yuvajobs.com for more details.
Nagarro
NAGARRO 9th FEBRUARY AT NEW DELHI
Nagarro 1st written test consists of the following with the time
limit of 2.5 hrs
1. Aptitude (20 Q,s)
2. Analytical Ability (20 Q,s)
3 Coding paper (4 Q,s - 1hr)
APTITUDE:
Aptitude consists of geometry, 1question from trignometry,
Mensuration, Profit n loss and distance/speed/time and time and
work. This part was easy. Formulas to be used were mailed to us,
int prior, but they were not provided with the question paper.
ANALYTICAL ABILITY:
These questions were really easy, and can be done in 15-20 mins.
For above two, books I would recommend you would be Barons
and RS aggrawal and good puzzles book.
CODING (Should be Efficient in terms of time and space):
Aptitude and Analytical Ability papers were taken back when this
section was given to us. And in each coding question paper,
function prototype was given.
Programmin section 1.30 hrs 4 question.
1)Seat Reservation prog for the theatre. Write a function for seat
allocation for the movie tickets. Total no of seats available are 200.
20 in each row. Each row is referred by the Character, "A" for the
first row and ,J, for the last. And each seat in a row is represented
by the no. 1-20. So seat in diffrent rows would be represented as
A1,A2....;B1,B2.....;........J1,J2... Each cell in the table represent
either 0 or 1. 0 rep would seat is available , 1 would represent seat
is reserved.
Booking should start from the last row (J) to the first row(A). At
the max 20 seats can be booked at a time. if seats are available,
then print all the seat nos like "B2" i.e (2 row, 3 col) otherwise
Print "Seats are not available." and we must book consecutive seats
only.
2) A string of charaters were given. Find the highest occurance of a
character and display that character.
eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE
OUTPUT: E
3) Int Matrix of certain size was given, We had few values in it
like this.
1
4
5
45
3
3
5
4
34
3
3
12
3
3
4
3
3
3
4
4
3
We were supposed to move back all the spaces in it at the end.
Note: If implemented this prog using recursion, would get higher
preference.
4)write a function to give demostrate the functionality of 3D
matrix in 1D matirx. function prototye: void set (int value,int
indexX,int indexY,int indexZ, int [] 1dArray);
void get (int value,int indexX,int indexY,int indexZ, int []
1dArray);
On 26th Feb, we were called for the interview on the next day. i.e
27th Feb.
There in we had to appear for the written test again of coding,
consisting of 4 Q,s and followed by one tech interview and then
HR interview. HR is just the formality.. All the candidates went
through, all 3 rounds.
CODING Q,s in the 2nd written test.
1. A chessboard was given to us. Where in there was a Knight and
King was placed on certain positions. Our aim is to reach the king
from the knight in minimum no of counts.As we know, knight can
either move 2 steps vertical/horizontal and 1 step
horizontal/vertical. same goes here as well. Proper image of the
chess board was given in the question paper, and all the
positions(max 8) were given that knight can take in the first step.
Sol : Most of us implemented using recursive func.
2. Struct person{
char * name;
person[] friends;
};
We were given the networklist of friends. Each has set of friends
which was unidirectional i.e, if you are my frnd, then i may or may
not be in ur frnds list. okie. Network was like this:
Amit - ->Rahul -> Aman -> kumar
Rahul- ->Vipin->Ankit->Reena->kumar
Kumar- ->Rahul->Reena->Tanmay
We need to identify whether 1st person being passed is a frnd of
another person or not. Frnds can be frnd,s friend also and so on.
And we need to identify the distance. for example
Input: Amit, Kumar
Output Distance 1
Input Amit, Tanmay
Output: Distance 2
Input: Rahul, Aman
Not frnds.
3) There was a 2D matrix given, we were supposed to sort the all
diagnols elements. diagnols of Top left corner and Top right corner
were to be sorted in the same matrix in an efficient way.
4. We need to write the function to check the password entered is
correct or not based on the following conditions..
a) It must have atleast one lower case character and one digit.
b)It must not have any Upper case characters and any special
characters
c) length should be b/w 5-12.
d) It should not have any same immediate patterns like
abcanan1 : not acceptable coz of an an pattern
abc11se: not acceptable, coz of pattern 11
123sd123 : acceptable, as not immediate pattern
adfasdsdf : not acceptable, as no digits
Aasdfasd12: not acceptable, as have uppercase character
Download