## Zynga Interview Questions

- 0of 0 votes
Design and implement a interest matching algo, to match people according to their interests in a particular area.

Suggest a score based on their interests. And rank matchings accordingly.

- 2of 2 votes
Given a cube made of N x N x N sub-cubes, how many sub-cubes are on the outside of the cube?

- 1of 1 vote
Given as follows:

- 0of 0 votes
You are given a 2D array and each cell has some eggs in it represented by a number. you have to start at (0,0) you can either move right or left. now when you reach (m,n) you shd hav collected max eggs. WAP to print max number of eggs that can be collected in a given matrix.

- -1of 1 vote
SUM OF PREVIOUS SMALLER NUMBERS IN ARRAY efficiently. For every given element in the array you should return the sum of previous smaller values you encountered in the array . example : arr = {2, 5,1,9, 3}

for a[0] i.e. 2 , sum = 0, a[1] i.e. 5, sum = 2, similarly for a[4], i.e. 3 , sum = 2+1 = 3.

- 1of 3 votes
Given an array, you should start at index 0, and you can jump

from the current index to a max of " current index + arr[current index]

and make it out of the array at the other end in minimum number of hops.

- 0of 0 votes
We have array that contain integer number, I would like to find the numbers that repeated k time in this array. The array is not sorted, and the numbers are not bounded.

Example,

A(20, 6, 99, 3, 6, 2, 1,11,41, 31, 99, 6, 7, 8, 99, 10, 99, ,6)

Find the numbers repeated more than 3 times.

Answer: 6,99

possible answer using bit wise operations (xor) or combination? Efficiency in running time Big(o) is required as well as the space capacity.

- 0of 0 votes
Given that a disk page can hold at most 1K bytes, a search key uses 4 bytes, and a pointer uses 4 bytes.

Can we analyze the size of an expendable hashing index to index a table column which is defined using unique constraint. What would be the minimum and maximum size of the expendable hasting index if the bucket address table is fully extended?

- 0of 0 votes
find least common ancestor in btree.

Note:its btree not bst

- 0of 0 votes
find all broken links in a web page

- 0of 0 votes
how to implement LRU for ecommerce site --> use linklist+map

- 0of 0 votes
How will you store friend-to-friend relation of facebook in db

- 1of 1 vote
Find duplicates in Array. I presented solution in O(n) time and space using hash. Finally did it in O(n) time and constant space. Assumption: range of numbers is known.

- 0of 0 votes
Reverse a Linked List. Iterative and then recursive.

- 0of 0 votes
Reverse words : "I love to play" becomes "play to love I".

He wanted it to be done in place.

- 0of 0 votes
n=4 and k=3 . team name can be formed by four digits 1,2,3,4 . so n=4 now make team number using any three digits so that b1<b2<b3. Basically print numbers which are in form b1<b2<b3..e.g. 123,124,234 etc

- 0of 0 votes
write a function that takes two numbers a and b and returns a.b eg: a=10 and b=12 output will be 10.12