Data structures Interview Questions | Glassdoor

Data structures Interview Questions

117

interview questions shared by candidates

Data structures Interview Questions

Sort: RelevancePopular Date

Write a function that returns the depth of a tree.

4 Answers

Write an algorithm that does an in-order traversal of a tree recursively. Now, write the same algorithm iteratively.

4 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

Given a singly linked list, how can you find if there is a loop in the list?

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

Print the nodes of a complete binary tree in level order.

2 Answers

Blocking queue implementation. Coding was required.

2 Answers

How would you print last n elements of a linked list, n being small compared to size of linked list?

3 Answers

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

3 Answers

Create a Queue using two Stacks.

2 Answers
2130 of 117 Interview Questions