Sapient Placement Paper & Interview 25 August 2007 at Hubli


Sapient had come to BVB college of Engg, Hubli, Karnataka on 25th August 2007 for 1st round of campus recruitment. Only CS and MCA domain are eligible for this company and here it was a pool campus for all North Karnataka. Guys let me tell you that I did not knew anything about this company. They did not give any ppt and directly took the first round in which we had to write a program which is as follows:




1. You have to write code for the following program.

2. You can use any language but (Java, C++ preferable)

3. Do not write any input function or main function.

4. Please complete feed back form

5. Make required assumption.

6. Do write comment where necessary.

7. Follow flowchart and algorithm if required.


Construct an online registration of symbiosis entrance exam. The user must be given preferences for location (at least three preferences). Consider some maximum entries in each location. If the registration are over then the next preference must be given as a choice and so on, there must be preference for date also each location will have 2 dates on which the exam will be conducted. The user must enter his preference for date as well as location. Considering the constraints for each location and date a valid choice must be given to the user.


Guys many constraints were given I can’t remember everything. This was the abstract problem definition.


After about 7 days our placement officer told that I and along wit me 9 from our college have been selected for the 2nd round. Our 2nd round was in the Company’s office itself in Bangalore on 15th Sep 2007.

Around 70 had made it till the 2nd round, they were from many places including Tamilnadu and Andhra Pradesh.


In the 2nd round we were given another program to write, as follows:

Instructions same as above:


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, care is taken 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 number printed for the each name.


After this round everyone was called for tech interview there wasn’t any short listing


Now I will tell u the most interesting part that was my interview. I was the first person to be called and it was a cool 1hr 15min interview. The hr himself called me. I was being asked to jus sit for a while outside his cabin and I saw he wasn't doing anything inside. I think he was testing my patience. After some time he called me in. After wishing him he told me to sit.


The interesting part of this interview was that first he gave me his introduction and then asked about me. He was too cool and quite young he was just 28. He asked me to call him by his name but I told him I am comfortable calling sir.


Then he asked me to explain the entire code (2nd program). For everything what I was telling him he would give me some instances about that program and asked me solve it. I did it very easily.


Actually Sapient has one more round called business round same as HR round but due to time constraints they merged wit tech round. Here he asked me some basic hr question like y sapient? N all such things also he would put me in some situations like he asked me if any project partners leave the project then what will u do? Etc etc…


After the interview first he asked me to give his feedback and then he asked me to ask any question about Sapient. I did ask a few. Then he told me that result will be sent to our college placement officer. After 2 days I got a call from my p.o that I was selected and what else we had a party that day…


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: suppose



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 problem:


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.