The interviewer asked a question about sorting cards. Given a complete set of cards, you should sort them without using extra space.
Software Interview Questions
551,205 software interview questions shared by candidates
You have to measure exactly 4 liters of water, but you only have a 3-liter bottle and a 5-liter bottle. How do you do it?
Signed NDA
Print a Binary Tree level by level
Given an array A, find the count of the ordered pairs. An ordered pair is defined as any number A[j], such that A[j]>A[i] and j>i. You have to do this in optimal time.
Write a method to compute if a string is a palindrome, disregarding spaces.
You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others weigh exactly the same). You a provided with a simple mechanical balance and you are asked to find out the minimum amount of weighings necessary to identify the heavier ball.
Design an algorithm to search an element in a singly linked list in O(1) complexity without using any other data-structure.
Write a code for finding a certain element in an unsorted array assuming element definitely exists. How can we improve the efficiency?
Write a non-recursive traversal of a Binary Search Tree using constant space and O(n) run time.
Viewing 2201 - 2210 interview questions