You have one billion numbers, implement getRandom() which returns a random number from them. Constaints: 1. No duplicate returning value. 2. getRandom() will at most be invoked 100 million times. Then optimize for space.
Softwareentwickler Softwareentwickler Interview Questions
512,723 softwareentwickler softwareentwickler interview questions shared by candidates
The hardest problem posed was the C# function I had to write. Write a function that accepts a character parameter such as "8" and then returns its digit value which would be 8 in this case. You cannot use any helper functions, casting or conversion functions. int ParseCharToInt(char c)
Unusual sort: sort an array A such that: A[0]<A[1]>A[2]<A[3]>A[4]<A[5].............
Find the number f set bits in an integer
Why are manhole covers round?
Finden Sie anhand eines Strings das kleinste Fenster mit vorgegebenen Anzahl an Zeichen.
Write a Java program that takes a 2D bitmap (represented as a 1D array of integers), and reverses it about its vertical axis.
find and output the given number's shortest square sum. like input: 12=2^2+2^2+2^2 (not 3^2+1^2+1^2+1^2) output: {2 2 2}
You're given a binary tree and pointers to two nodes in the tree. Describe the fastest algorithm you can come up with to determine the closest common ancestor.
a. Given a function double f(double x), 0<=x<=1, f(x) is increasing. f(0)<0, f(1)>0. Find x s.t. f(x)\approx 0.
Viewing 1171 - 1180 interview questions