Sapient Placement Questions
CAN SOMEBODY HELP ME SOLVING THESE QUES
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 discussion.so 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 alphabet.eg
merging of aabhinv and abbhhixz is aabbhhinvxz.
-
Interview Candidate
- Mar 30th, 2006
- 32
- 7537
Showing Answers 1 - 32 of 32 Answers
Related Answered Questions
Related Open Questions
Sapient Placement Questions
CAN SOMEBODY HELP ME SOLVING THESE QUES
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 discussion.so 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 alphabet.eg
merging of aabhinv and abbhhixz is aabbhhinvxz.
Related Answered Questions
Related Open Questions