Algorithm Interview Questions | Glassdoor

Algorithm Interview Questions

785

interview questions shared by candidates

Algorithm Interview Questions

Sort: RelevancePopular Date

Given a list of strings, write a function to calculate the longest common prefix (LCP) of all those strings.

6 Answers

Given an array of integers, all but one of which appears an even number of times, find the one integer which appears an odd number of times. Upon completion, asked to improve the algorithm in terms of both time and space, eventually asked to do it in O(n) time and constant space.

4 Answers

how to get the most significant bit from a byte?

3 Answers

Create a data structure that minimizes time complexity of retrieving median and inserting new element. Getting median should be O(1) and insertion should be O(log(n)).

5 Answers

Fibonacci implementation

3 Answers

You have a set of envelopes of different widths and heights. One envelope can fit into another if and only if both the width and height of one envelope is greater than the width and height of the other envelope. What is the maximum number of envelopes can you russian doll?

3 Answers

to developd to class software describe it

3 Answers

About the details, and interviewer will communicate with you when you are typing.

3 Answers

Given an array of integers, all but one of which appears an even number of times, find the one integer which appears an odd number of times.

3 Answers

You are given a dictionary, such as /usr/share/dict/words, containing a list of words, one per line. You are also given seven tiles. Each tile is either blank or contains a single lowercase letter (a-z). List all of the words from the dictionary that can be produced by using some or all of the seven tiles, in any order. A blank tile is a wildcard, and can be used in place of any letter. Try to use a minimal amount of memory. 1. Find all of the words that can be formed if you don't have to deal with blank tiles. (You may skip this step and go straight to step 2). 2. Find all of the words that can be formed, including those where blank tiles are used as wildcards. 3. Would you do things differently if you had to process several hundred tile sets with the same dictionary?

4 Answers
6170 of 785 Interview Questions