You have three sock drawers. One has red and blue socks, one has blue and green socks, and one has green and red socks. What is the expected number of socks you must pull to be sure which drawer is which, assuming that the number of socks of each color in each drawer is both large and equal?
Desarrollador Sr Java Interview Questions
713,570 desarrollador sr java interview questions shared by candidates
Reversal of String Difference between GET and POST REST API
Implement a stack using a Queue
I had a difficult question about a cuboid composed of smaller cubes. How many cubes are there where exactly two faces of the cube are exposed?
How would you count the number of words in a string consisting of uneven number of spaces between words( not dictionary words)? With and without library functions.
ii) In a file or one million words find a pattern of words.
count the number of times a word has occurred in a given string
You are given 1000 containers of water with exactly one container containing poison. You can use pigs to test which container contains poison. The conditions are that: A pig drinking the poisoned water woudl die exactly after 1 hour and that a pig could be used for sampling multiple containers. Assume that the pig takes 0 time to drink water from any number of containers. What is the minimum number of pigs would you use to identify the poisoned container within 1 hour.
Print all permutations of a given string.
There are 199 elements in array. It has only one distinct value? How will find this distinct value? Also for solution please tell about O(n)?How can you make it more efficient?
Viewing 1701 - 1710 interview questions