Answer:
There are number of useful predefined macros which are part of the C/C++ standard. During preprocessing, they are replaced respectively by a ...
Published Questions
How do you get the line numbers in C?
Posted by CMaster
Question
Design a deck of cards class for poker game, then generalize it to be used in any card game. What properties, fields and methods would this ...
Answer:
Hash tables (hash maps) - is amortized constant-time access data structures that map keys to values.
Binary Trees - is a tree data structur ...
Race speed interview question
Posted by CMaster
In a two lap race you drove first lap with average speed of 40 mph. You know from previous races that to win the race your average speed has to be 80m ...
Answer
Note: array should be sorted or Binary search won't work !
int binarySearch(int arr[],int size, int item)
{
int left, right, middle;
left = 0 ...
Apples delivery math interview puzzle
Posted by CMaster
The distance between the towns A and B is 1000 miles. There is 3000 apples in A, and the apples have to be delivered to B.
The available car can tak ...
Expected number of carts in the train
Posted by CMaster
Full question:
Suppose you're on a train that has 1 to 100 carts. Given you are in fifth cart, what's the expected number of the carts?
Company where asked this question: CSFB
Interviewed for position: quant jobs
Suppose you're on a train that has 1 to 100 carts. Given you are in fifth cart, what's the expected number of the carts?
Company where asked this question: CSFB
Interviewed for position: quant jobs
Question:
Given an array of integers A[N], find the maximum value of (j-k) such that A[k] <= A[j] & j>k
Given an array of integers A[N], find the maximum value of (j-k) such that A[k] <= A[j] & j>k
How would you implement Iterator Pattern for traversing Binary Tree (in any order of your choice)?
So, the following would give an example of using s ...
Company where asked this question: Amazon (Seattle)
Company where asked this question: Amazon (Seattle)
My answer was:
Bubble Sort
Heap Sort
Insertion Sort
Merge Sort
Quick Sort
Selection Sort
Bucket Sort
Follow up question was to ...
Interviewed for position: SDET (Contractor)
Interviewed for position: SDET (Contractor)
Sort Questions
Saved Stories
Common Interview is a place to help people keep up with the latest trends in job interviewing. You can interact by asking interview questions or by providing answers and ratings. Choose from thousands behavioural, technical, testing or program management questions and interview puzzles.
