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)).
Software Development Programmer Interview Questions
33,158 software development programmer interview questions shared by candidates
Write an algorithm to verify if a tree is a binary search tree.
Divide two numbers without using / or % and return quotient.
Using only putchar how would you print out the ascii values for each digit in an integer. For example if the integer was 123, then you would want to print the ascii values for 1, 2, and 3.
Given an infinite stream of numbers, find the top 50 integers. What's the data structure to use, and what's the time complexity.
Write a program to find the square root of a double.
Write a function to search for a string within another string. Analyze it's complexity, and propose optimizations.
Write a program to check if a number has rotational symmetry i.e is the same when rotated by 180 degrees. Ex 1691, 181, 11, 1001
Write a function that takes in an array and repeats an integer that appears the most.
Given a string of Rs and Gs, design an algorithm to produce a string with Rs in the front and Gs after that. The number of flips from Rs to Gs or otherwise should be minimum. The number of Rs and Gs in the end need not be same as that in the beginning, however the length of the entire string should be the same.
Viewing 121 - 130 interview questions