Algorithm Interview Questions | Glassdoor

Algorithm Interview Questions

785

interview questions shared by candidates

Algorithm Interview Questions

Sort: RelevancePopular Date

(a) first, write a function to calculate the hamming distance between two binary numbers (b) write a function that takes a list of binary numbers and returns the sum of the hamming distances for each pair (c) find a solution for (b) that works in O(n) time.

10 Answers

Given a string, remove all the duplicate characters (not necessarily consecutive)

9 Answers

Describe a routine which returns the set of integers in {1..100} divisible without remainder by 3 but not by 9.

12 Answers

Convert a binary search tree to a sorted, circular, doubly-linked list, in place (using the tree nodes as the new list nodes).

8 Answers

Print a singly-linked list backwards, in constant space and linear time.

10 Answers

Implement the "see and tell" algorithm with a given seed number x and a number of iterations y. Output the result on iteration y

10 Answers

There are n pots with different # gold coins in them. Two players play a game, where each player can select a pot at either ends. maximize the gold

7 Answers

If you have a file containing millions of integers, how would you sort the data in the file using extremely limited resources, such a s 1GB of memory?

8 Answers

Given a list of integers, some of which may be negative, extract the pair that sums to the largest number.

8 Answers

How would you find the pairs of numbers that added to some specific number in an array.

7 Answers
1120 of 785 Interview Questions