Asked question: Using an already implemented method Rand5() that generates a random integer between the ranges 1-5 uniformly. Using this method, implement a a new method that returns a random integer in the range 1-7 uniformly, i.e. Rand7(). Basically this is Rejection Sampling Algorithm. See http://leetcode.com/2010/11/rejection-sampling.html
Software Engineer In Test Interview Questions
11,948 software engineer in test interview questions shared by candidates
Roman to Int
Tree Data Structure
Write code to reverse a linked list from its mid point. So 1->2->3->4->5->6->7 becomes 1->2->3->7->6->5->4
Implement atoi()
String manipulation related questions were asked
find common ancestor in binary tree
Count no. of words in a string
Reverse the string
int Solve(string str); Given the signature above, implement the simplest method that returns the results of the following arguments: 1. “3+5” (8) 2. “10+2-8” (4) 3. “5+10*3” (35) 4. “3+5--6" (14)
Viewing 261 - 270 interview questions