Interview questions
Sde interview questions – page 2
112 questions. Tap “Show answer” to check yourself.
-
What exactly happens when you add someone as your friend ?
-
Explain more about hadoop and how it is used ?
-
How do u implement timeline/newsfeed ?
-
How do u implement status updates ?
-
How does fb store likes/dislikes ?
-
Given a hashmap M which is a mapping of characters to arrays of substitute characters, and an input string S, return an array of all possible mutations of S (where any character in S can be substituted with one of its substitutes in M, if it exists). What is the time complexity? What is the space complexity? Can you optimize either? Example input: M = { f: [F, 4], b: [B, 8] } S = fab Expected output: [fab, Fab, 4ab, faB, FaB, 4aB, fa8, Fa8, 4a8]
-
Brain storming:How does facebook implement graph search
-
How does facebook chat work
-
Given a list of integer numbers, a list of symbols [+,-,*,/] and a target number N, provide an expression which evaluates to N or return False if that is not possible. e.g. let the list of numbers be [1,5,5] and the target number is 9, one possible solution could be 5+5-1
-
Given an expression (in single variable) like 4x+13(x-(4x+x/3)) = 9, evaluate x The expression is a string and the variable is always x
-
How will you describe iOS manual memory management for a new developer in few words?
-
Write a program to print the powerset. E.g. given this set {1,2,3}, it will print {},{1},{2},{3},{1,2},{1,3}, {2,3}, {1,2,3}
-
Convert a string of Roman numerals to an integer in O(n) time
-
Given a set of 2D points, some integer k, find the k points closest to the origin, (0,0)
-
given a 2D array of 0 and 1. where each row is sorted. find the row with maximum no of 1 in minimum time complexcity
-
Tournament tree puzzle and write code for that
-
Find the 2 maximum elements in array in O(n+log(n)) comparison
-
Celebrity Problem puzzle and write code for that
-
Find a equilibrium index in array
-
find the minimum no of jumps required to reach the end of array.where element at each index represent how many max moves you will take in right
-
Given an array which is alternatively sorted. What will be the time complexity to find out an element in it. e.g. 14,3,16,6,22,7,24,11,27
-
What is the difference between the two declarations? int p=*(int*)i; int p=*(int*)&i;
-
Given an unsorted array of size 5. How many minimum comparisons are needed to find the median? then he extended it for size n
-
given 3 sorted arrays, array a, b, c. find all pairs where a[i] + b[j] = c[k] note : a, b , c are sorted arrays
-
There are 9 identical Marbels out of which 1 is heavy. find out that Marbel
-
Name any 1 microsoft product that you have been using and suggest 5 improvements in it alongwith priority assignments p1...p5
-
A square picture is cut into 16 squares and they are shuffled. Write a program to rearrange the 16 squares to get the original big square
-
Given an array A[n] such that A[i+1] = A[i]+1 OR A[i]-1, and a number k, find out whether k is present in A[n] or not, in most efficient way?
-
Solution for solving problems generated by virtual functions
-
Optimized fibonacci program