Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Programming Languages AllOther Interview Questions

hi friends please tel me how to handle the recovery manager(All i.e PopUp ,Application Crach ,Object state,etc) in QTP

1 Answers   IBM,


iam confused among testing ,.net and java. can anybody help me.

0 Answers  


how to invoke the macro in another macro?

1 Answers   Accenture,


Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?

0 Answers  


Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)

0 Answers   Amazon,






This is a puzzle question .... The warden meets with 23 new prisoners when they arrive. He tells them, "You may meet today and plan a strategy. But after today, you will be in isolated cells and will have no communication with one another. "In the prison is a switch room, which contains two light switches labeled A and B, each of which can be in either the 'on' or the 'off' position. I am not telling you their present positions. The switches are not connected to anything. "After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him to the switch room. This prisoner will select one of the two switches and reverse its position. He must move one, but only one of the switches. He can't move both but he can't move none either. Then he'll be led back to his cell. "No one else will enter the switch room until I lead the next prisoner there, and he'll be instructed to do the same thing. I'm going to choose prisoners at random. I may choose the same guy three times in a row, or I may jump around and come back. "But, given enough time, everyone will eventually visit the switch room as many times as everyone else. At any time anyone of you may declare to me, 'We have all visited the switch room.' and be 100% sure. "If it is true, then you will all be set free. If it is false, and somebody has not yet visited the switch room, you will be fed to the alligators." What is the strategy they come up with so that they can be free?

6 Answers  


SYNFOSYS PLACEMENT PAPER 2010 Hi Friends I have attended the recent synfosys test 2010. Here r some questions which i remember. Section – I 1) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 2) There r 7people carrying 7bags. Each bag contains 7cats. Each cat has 7small cats. How many total legs r there? 3) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 4) 5) There r 2 poles each 15 meters high. A cable of length 16 meters is tied between pillars top. For its maximum the cable lies down above 7mts high from the ground. What is the distance between pillars? ------------------------------------------------------------ ------------------------------------------------ Section -II What is the value of 11^5 Some Other quetions ------------------------------------------------------------ ------------------------------------------------ Section - III 16) Serialization and deserialization? 17) Will finally block execute even though there is an exception & return statement are there in catch block? Explain? 18) memory leak? How can we avoid it? 19) virtual destructor? 20) Two program codes for code optimization? ------------------------------------------------------------ ------------------------------------------------ Section – IV Q) Program for finding the alternate digits of the number If number is 35846 then Sum1=3+8+6=17 Sum2=5+4=9 Q) Program for Single linked list? ------------------------------------------------------------ ------------------------------------------------ Section - V Q) What is software engineering? Explain SDLC Q) Explain any two upcoming IT Scenarios? ------------------------------------------------------------ ------------------------------------------------ Regards Gopinath Allanku +91 9885457211

2 Answers   synfosys,


MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON

0 Answers  


swap two number wthout using third variable

4 Answers   eClerx,


Question:Why is mapping required? Computer 'Paging' & 'Segmentation'. Question:Give the disadvantages of Havander's Strategies. Question: What do you mean by Belady's Anomaly. - Describe with example. Question: Discuss the various function of OS. Question: Give a brief discussion on schedulers & Dispatchers with respect to process management.

0 Answers  


4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?

0 Answers   TCS,


how to remove header and footer in jcl using sort utility

0 Answers   CTS,


Categories