Académique Documents
Professionnel Documents
Culture Documents
Use link list within link list. Every node consists of tag_value, *child_menu, *next_menu_item
2. Isko me bhool gaya exactly kya hai… but u should know hashing for this problem.
3. Something like
232
23432
4. This was descriptive problem…. Like if ISBN is 3546 then its value will be
3*10+5*9+4*8+6*7………………
Something like that but was a little bit complex than this…
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.
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
Note: If implemented this prog using recursion, would get higher preference.
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.
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:
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
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
...............................................................................................................................................
.................................................
3)Remove all the blank spaces between character.Matrix is of 10* 10.
eg: INPUT
------------------------------------
| N | A | | V | |T
-------------------------------------
| |G | U | |P |
--------------------------------------
|T | | | A | |
------------------------------------
OUTPUT:
------------------------------------
|N|A|V|T||
-------------------------------------
|G |U | P | | |
--------------------------------------
|T | A | | | |
------------------------------------
There are 30 products and 10,000 records of such type. Also the month period during
which sales happened is given to u.
Ques4: An array of size 5X5 is given to us. The elements from 1 to 25 are to be inserted
in the array, such that starting from a particular position for an element i, the next element
i+1can be inserted only at the mentioned positions (u,v), and if these all positions are
occupied then it returns giving a count of how many positions have been occupied in the
array:
(u,v) = (x+/-3 , y)
(u,v) = (x , y+/-3)
(u,v) = (x+/-2 , y+/-2).
Example: if the starting element is 1 with the given positions (1,2), then next element 2
can be placed at any one of the positions marked with *.
_____
1___*
_____
__*__
*____
Function to be implemented is fun(int start, int end) where start and end will give the start
and end coordinate of first element i.e. 1.
Q. 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
Note: If implemented this prog using recursion, would get higher preference.
b) Display Pattern:
2 3
4 5 6 7
8 9 10 11 12 13 14 15
…
c) Perform the functionality of 2-D array through 1-D array and in it the functions to be
performed were:
Pattern: Code
This was the paper held on 23 September,2006 . they shortlisted only 10 for various
institutes. I was also having my name in those shortlisted candidates. The cut off was
(80+ IN APTITUTE, 8+ IN TECHNICAL). They called us for the interview on 9
October,2006 .
On 9th they again took a technical test of four new programming questions to be
developed in c++, The questions were:
a) suppose u r given a 4*3 rectangle like (take these values from user)
b) Suppose u r given a string. U have to find the occurance of the characters A-Z in
that string. Each character must appear in the string and must appear only once. If It that
occurs in string more than one time return 1 showing it is a perfect string otherwise return
0 showing it is not a perfect string.
c) Suppose u r given 10000 marks. U have to pick up top 20 top marks from them and
display it on the screen.(Use the optimal sorting algorithm)
d) Suppose u have a chess board. U have to insert 8 queens on the chessboard in the
style that the queens don’t intersect in the diagonals, columns and rows. If they intersect
return 1 else return 0.(that is no more than one queen should be present either in row or
column or diagonals.)
Then the next round was technical interview. The interviewer was very cool and friendly.
He just asked some general questions and then u have to justify the code that u have
written in the test line by line. If he is satisfied from ur code then HR interview is only a
formality.
--
bibhash
bhu
mca