Custom Search


Sunday, March 2, 2008

Sapient placement paper

2 programs to write .They are only looking at the logic...they don't care how u wrote the program,,,,ya..little bit they will c.. then there is a Tech +business interview.It was cool...they were very it was not a problem.


Program 1. Reservation. there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
Program 2. Stringreplace The forum is going on and administartor find that some people use abusing or bad lnaguage in he decided that when he uses such language it was replacedc with beap. question: 1. draw class digram,and use appropriate data structure. 2. write function replacestring()

1) Write a program for the problem: the array of
inetegers indicating the marks of the students is
given, U have to calculate the percentile of the
students aaccording to this rule: the percentile of a
student is the %of no of student having marks less
then him. For eg:

Student Marks
A 12
B 60
C 80
D 71
E 30
F 45

percentile of C = 5/5 *100 = 100 (out of 5 students 5
are having marks less then him)
percentile of B = 3/5*100 = 60% (out of 5, 3 have
markses less then him)
percentile of A = 0/5*100 = 0%.

2) The code was given for a problem and u have to
identitfy the logical error in it. That was simple.
The code was to merge the Danagrams of 2 words. The
danagram of a word is the letters of word arranfed in
sequential order. eg danagram of abhinav is aabhinv.
merging of danamagram is to merge the danagrams of 2
or more words such that the highest no of occurance
are coming for each


round1: write 2 programs on paper in 1 hour
.based on chair char in trains function to
allot seats to people with some conditions like try to
give them consecutives one etc
.based on strings like give string remove
toxic words like stupid etc by ###
round2: write 2 programs on paper in 1 hour
.based on postal system,how to decide the amt
payable to companies sending post everyday, sorting
them,discount and many more requirements.
.to compress the data send across the company
and filter out the corrupted data.
round3: technical discussion for abt 45 mins on 2
programs of round 2
additional 2 programs to seach an element
immediately gr8r then all present in an array without
and a modified version of it to handle all
error conditions. etc
what questions I have
round4: behavioual interview 1(HR) for abt 45 mins
tell abt urself
describe deployment of one full project any
why sapient
what can u bring on table
conflicts in team and how were they ressolved
what questions I have


The test contained 3 questions:

1. design a class diagram or date model for this

A company has some clients and some officers. Also ithas some rooms to be used for meetings between client and officers. one officer is responsible for each room. and room has unique room id. a meeting will be aranged only when the officer and client are free and room is also free. the officer and clients must be registered to the system which will give them unique email ids. arrange the meetings. dont write ode.
2. write a program to find the occurance of charachers '!', '$' '?' '.' ',' etc. Also write a function to replace all odd occurance of '?' to '.'.
3. there was a given program to insert a value at the proper postion in a doubly linked list. there was some logical error in that due to which it was not working properly. find out that error. it was easy.

No comments: