Find best Interview questions and answer for Webedia Job. Some people added Webedia interview Questions in our Website. Check now and Prepare for your job interview. Interview questions are useful to attend job interviews and get shortlisted for job position. Find best Webedia Interview Questions and Answers for Freshers and experienced. These questions can surely help in preparing for Webedia interview or job.
This page contains the most recently asked technical questions and answers in the Webedia.
All of the questions listed below were collected by students recently placed at Webedia.
Answer = 10 races ….
Divide the horses in 5 group a,b,c,d,e. Since there are 5 tracks and assuming only one horse can run on one track hence one group of 5 can run at a time
1. Make each group race once and mark the position of each horse in the group as 1,2,3,4,5. So we have total of 5 races in this way.
2. Take the top horses of all the groups and make them run. The winner of this race is fastest horse of all. Promote the second horse of the winner group to 1. This constitute of 6th race.
3. Now take the first of all groups and do a race. This gives you horse for 2nd position. Again promote the next horse from the winner group. This constitutes of 7th race.
4. Now take the first of all groups and do a race. This gives you horse for 3rd position. Again promote the next horse from the winner group. This constitutes of 8th race.
5. Now take the first of all groups and do a race. This gives you horse for 4th position. Again promote the next horse from the winner group. This constitutes of 9th race.
6. Now take the first of all groups and do a race. This gives you horse for 5th position. Again promote the next horse from the winner group. This constitutes of 10th race.
So total of ten races is required to find the top 5 horses
the element is keyword “sub”
means write the subroutines,
which allow maximum readability
and allow maximum-reuse
if want any other;
write the classes and package..