Given 10 cups to locate the bottle poisoned wine from a batch of normal ones, you can make any mixture of them and test your mixtures by mouses. However the density of poison in the mixture, the testing mouse will certainly die. And you must give all the mixtures of the 10 cups before the test. There is only one poisoned bottle. How many bottles of wine you can test at most?
Software Developers Interview Questions
96,159 software developers interview questions shared by candidates
Find largest element in array without using any extra variables or any functions
Given any number of arrays containing numbers, write a function which finds the numbers that appear in exactly two arrays. arrays = [ [6, 2, 2, 0, 4], [5, 0, 2, 6, 7, 1], [6, 7, 9, 9], ] find_in_two(arrays) should return [2, 0, 7]
input log = [ { 'user': 'A', 'page': 1}, { 'user': 'B', 'page': 5}, { 'user': 'A', 'page': 2}, { 'user': 'A', 'page': 1}, { 'user': 'B', 'page': 2}, { 'user': 'C', 'page': 7}, { 'user': 'C', 'page': 3}, { 'user': 'A', 'page': 3}, { 'user': 'C', 'page': 1}, ] please implement discover_site_map(log) discover_site_map returns a representation of the links between pages, using whatever data structure you think is suitable: 1 -> 2, 3 2 -> 1 3 -> 1 5 -> 2 7 -> 3
Why is a manhole cover round?
Why should we hire you?
1.add only even number from given array 2.unique character string 3.decimal to binary conversion 4.palindrome string
1. Reverse character array without affecting special character in single loop. 2. given 2 character array S1 , S2 and 1 empty array S3. Populate S 3by interleaving character from S1 and S2
Russian roulette brain teaser: Interviewer takes an imaginary revolver gun with 6 empty chambers, and loads 2 adjacent chambers with bullets. Interviewer has the first turn: rolls the cylinder, puts it to his head, and pulls the trigger... no shot. The lucky interviewer passes the gun to you and gives you two options before you put the gun to your head and pull the trigger: (a) to roll the cylinder again or (b) not to roll the cylinder Which option would you choose?
Populate an array of numbers from 1 to N (inclusive). Given two numbers, p and q , if a number in the array is divisible by p print OUT, if a number is divisible by q print THINK. If number is divisible by both p and q, print OUTTHINK. Otherwise, print the number.
Viewing 71 - 80 interview questions