There are 25 horses, and each runs at different constant speeds. If you want to find the 5 fastest horses, what is the minimum number of races needed, if each race can have five horses at most?
Programmer Trainee Interview Questions
712,403 programmer trainee interview questions shared by candidates
Find if given text does have matching [ { ( opening and closing. So ({[]}) is valid and ({)} is invalid. They should open and close in proper order.
How would you sort the list of version numbers. For eg: You are given a list A as ["1.1","1.1.5","12.0","1.23","12.3"]. Now sort this ?
If you have 2 coins in your pocket (one is double-headed, and the other is a fair coin), you grab a random coin from your pocket and see that one face is a head. What is the probability that if you flip the coin, the other face is also a head (i.e. that you picked the double-headed coin)?
What is a JavaScript callback function?
Onsite interview 1: A paper test, questions including Java syntax, SQL, JavaScript, code review. Java syntax question is: given a method: int exchange(int a), we need: if a == 1 return 2, if a == 2 return 1. Give 4 methods to implement the method, "if" statement cannot be used. SQL question was about nested queries and aggregation. JavaScript question was to write a JavaScript function, when a radiobox is checked then alert sth. Code review question is an implementation of tree level traverse algorithm, lot of errors.
Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. You need to output the minimum number of words. For example, input: "aaaisaname" dict: ("a", "aaa", "is", "name") output: "aaa is a name" Wrong output: "a a a is a name"
First round is pattern based question like.. n=1 n=2 n=3 * * * *** *** *** * * * * ***** ***** * * * *******
A box is divided into 4 boxes which is further subdivided into 4 boxes and so on. What is the best Data structure suitable for this scenario?
Division without divide operator
Viewing 671 - 680 interview questions