There is a panel containing 3 light switches in front of you. Each switch controls a light in a room somewhere. Doesn't really matter where. You can play with the switches as much as you like, but you're only allowed to enter the room once. How do you tell which switch controls which light? Again, you can only enter the room once, so you cannot play with the switches after you enter the room, but you can play with them as much as you want before you enter the room. One entry is all it takes to determine which switch controls which light.
Developer Interview Questions
271,141 developer interview questions shared by candidates
write a function that returns the first unique element in an array
How do you reverse a number without storing it in an array Ex: 412 should be printed as 214
Write a java program that can convert a string of numbers (e.g. "5387") into an integer (5387).
How to find out whether a number is odd or even.
1,2,3,5,7.... what will be the next number in series
The third question was to generate all possible values for a string (for example if you have 'mother' sent as a string generate all possible strings you can have with the letters m, o, t, h, e, r like 'mthero', 'omther', 'therom', .....)
John went to a store and asked how much a certain item costs. The clerk said 1 dollar. John said "Okay, I'll have 600." The clerk said, okay your total bill is 3 dollars. What did John Buy?
You have two methods: one method takes long time to run and the other completes in short time. You execute the long method first and after that you execute the short method. Which one will complete first. There is no setTimeout involved.
Question: Given a string comprising of all words of a text book. Find out the no of individual strings and their occurrences.
Viewing 241 - 250 interview questions