Implement a multiple-reader-single-writer lock given a
compare-and-swap instruction. Readers cannot overtake
waiting writers.
4 men can dig 4 holes in 4 days. How many hours does it take for 1 man to dig half a hole?
what will the Next no. 10,20,30,68,__
7 Answers Apalya Technologies, EXL, Genpact, Schneider,
Five students - Akash, Chintan, Jignesh, Mukund and Venky - appeared for an exam. There were total five questions - two multiple choice (a, b or c) and three true/false questions. They answered five questions each and answered as follow. I II III IV V -------------------------------------------------- Chintan c b True True False Akash c c True True True Jignesh a c False True True Mukund b a True True False Venky b b True False True -------------------------------------------------- Also, no two students got the same number of correct answers. Can you tell which are the correct answers? What are their individual score?
Find the values of each of the alphabets. N O O N S O O N + M O O N ---------- J U N E
21 Answers Bhel, CAT, IBM, Infosys, Mind Tree, Wipro,
A remote island contains a tribe whose members have either blue or brown eyes. Tribe members do not know the color of their eyes and if they learn it, they must kill themselves the same night. Every member of the tribe always behaves logically...
2 Answers ABC, Amazon, Microsoft,
Ali Baba had four sons, to whom he bequeathed his 39 camels, with the proviso that the legacy be divided in the following way : The oldest son was to receive one half the property, the next a quarter, the third an eighth and the youngest one tenth. The four brothers were at a loss as how to divide the inheritance among themselves without cutting up a camel, until a stranger appeared upon the scene. Dismounting from his camel, he asked if he might help, for he knew just what to do. The brothers gratefully accepted his offer. Adding his own camel to Ali Baba's 39, he divided the 40 as per the will. The oldest son received 20, the next 10, the third 5 and the youngest 4. One camel remained : this was his, which he mounted and rode away. Scratching their heads in amazement, they started calculating. The oldest thought : is not 20 greater than the half of 39? Someone must have received less than his proper share ! But each brother discovered that he had received more than his due. How is it possible?
In a sports contest there were m medals awarded on n successive days (n > 1). 1. On the first day 1 medal and 1/7 of the remaining m - 1 medals were awarded. 2. On the second day 2 medals and 1/7 of the now remaining medals was awarded; and so on. 3. On the nth and last day, the remaining n medals were awarded. How many days did the contest last, and how many medals were awarded altogether?
Five friends with surname Batliwala, Pocketwala, Talawala, Chunawala and Natakwala have their first name and middle name as follow. 1. Four of them have a first and middle name of Paresh. 2. Three of them have a first and middle name of Kamlesh. 3. Two of them have a first and middle name of Naresh. 4. One of them have a first and middle name of Elesh. 5. Pocketwala and Talawala, either both are named Kamlesh or neither is named Kamlesh. 6. Either Batliwala and Pocketwala both are named Naresh or Talawala and Chunawala both are named Naresh. 7. Chunawala and Natakwala are not both named Paresh. Who is named Elesh?
Given a sequence of integers, there are a few sequences which result in balanced binary search trees i.e., AVL trees. Write a program that takes a sequence of integers as input and outputs the number of such sequences that result in the balanced binary search trees. Input Format: Single line contains sequence of integers terminated by -1. Output format: Print the number of AVL tree possible from that input sequence. Sample Input: 1 2 3 -1 Sample Output: 2
Nine plates of similar in design... same colour, same size but one plate among that has very small difference in weight. you should find it but the condition is u can use weighing pan only two times. at the second time u should be able to find the defeated plate..............
Difference between Bholu's and Molu's age is 2 years and the difference between Molu's and Kolu's age is 5 years. What is the maximum possible value of the sum of the difference in their ages, taken two at a time?
Implement a multiple-reader-single-writer lock given a compare-and-swap instruction. Readers cannot overtake waiting writers.