Coding Interview Questions | Glassdoor

Coding Interview Questions

72

interview questions shared by candidates

Coding Interview Questions

Sort: Relevance Popular Date

How would you write a sort routine to ensure that identical elements in the input are maximally spread in the output?

4 Answers

Given array of integers, find the first pair add up to 10. Analize your solution.

3 Answers

How would you count the number of words in a string consisting of uneven number of spaces between words( not dictionary words)? With and without library functions.

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?

3 Answers

Give me 5 different ways of finding the median (middle element) of a linked list. For the sake of simplicity, assume the list has odd number of ints. Also mention the runtime for each. Follow up: What's the fastest way you could find the median? What is the runtime? Oh.. and yes, code your answer(s) in any language of your preference.

4 Answers

How does a garbage collection system work? How will you prevent an object from being garbage collected? Write N-ary tree traversal code to search a node given a String key. How many JVM instances does a tomcat server have? How would it handle multiple applications with different versions of same api (for instance log4j)? Explain wait and notify. Explain Generics. What is the difference between a static class and a singleton class? Why do you want to work for Netflix?

2 Answers

implement sort(int a, int b, int c) in Java w/o using any Collections methods

2 Answers

Given array of integers representing historic stock prices. Find the buying and selling points to maximize the profit. (original: You can hold the stock for only 30 days maximum.)

2 Answers

Write strcpy (string copy). What test cases would you have? Write strrev (string reverse) in place. (temp char is fine)

2 Answers

Find a min and max in an array of integers.

2 Answers
1120 of 72 Interview Questions