Programming Interview Questions | Glassdoor

Programming Interview Questions

216

interview questions shared by candidates

Programming Interview Questions

Sort: Relevance Popular Date

Binary tree with parent pointers, given two nodes find common ancestor.

3 Answers

Design an email sender that can send 100,000,000 emails. You have 5 machines how could you do it efficiently.

3 Answers

Write a program for creating Huffman Coding for a set of characters given its frequency table.

2 Answers

When did you over-promise to a customer? When did you have to make an unpopular decision?

4 Answers

Please describe how to implement a function to print out a linked list backwards

2 Answers

Given a square Grid of numbers, Considering all the numbers at the boundary as 1 layer and numbers just inside as another layer and so on how would you rotate each of the layers of the numbers by a given amount.

3 Answers

Suppose you have a stack of pancakes of pairwise distinct sizes. You wish to order the pancakes the pancakes by size, with the largest one on the bottom. The only operation is available to you is a spatula flip: You can insert a spatula anywhere in the pancake stack and flip over the stack above the spatula, reversing the order of the pancakes. For instance, in the following stack bottom . 2 3 | 5 1 4 . top Inserting the spatula between 3 and 5 will give: bottom 2 3 4 1 5 | top Design an algorithm to sort the pancake stack using this operation. Write a program to execute this algorithm in C++. What is the runtime efficiency (precisely, not just in Big-O time), assuming that a flip is an atomic operation? Is your algorithm optimal (again, precisely, not just asymptotically)?

2 Answers

Design a class to process a matrix, and it needs to be able to return the average for the elements of arbitrary sub-rectangle inside that matrix, in constant time.

2 Answers

You are to write a spell checker. Discuss the API, Data Structures and Algorithms.

2 Answers

Describe to me in C how to take the word "FOX" and rearrange the words backwords to spell "XOF" using only a stack and one variable.

2 Answers
3140 of 216 Interview Questions