BingBang
BAN USER- 0of 0 votes
AnswersYou are on a point on Google Maps (longitude, latitude). You select a radius, and expect to get a list of all the places within that radius. How would you implement this?
- BingBang in United States| Report Duplicate | Flag | PURGE
Pinterest Software Engineer Intern Algorithm - 0of 0 votes
AnswersHow would you implement live search for people's names (only firstname and lastname, or lastname and firstname) like in facebook's search, retreiving the top 5, knowing a value between 0 and 1 for every one of them. If you are close friends then the value will be bigger. You should output the first 5 values in descending order.
- BingBang in United States| Report Duplicate | Flag | PURGE
Pinterest Software Engineer Intern Algorithm - 4of 4 votes
AnswersYou have a number L and N distinct integers between 1 and 100.
- BingBang in United States
You can use each number as many times as you want. Print the minimum subset size of these numbers which add up to L and how many ways are there to choose them (the order does not matter).
0<L,N<=100
examples:
input1:
L=7 N=6
2 1 5 4 3 6
output1:
2 3 (minimum 2 numbers, 3 ways to choose: 1 and 6, 2 and 5, or 2 and 4
input2:
L=7 N=3
4 2 6
output2:
0 0 (can't get 7 from 4,2 or 6)
input3:
L=14 N=3
8 7 1
output3:
2 1 (we choose 7 twice)
input4:
L=100 N=3
2 97 1
output4:
3 1| Report Duplicate | Flag | PURGE
Software Engineer / Developer Algorithm
it asks for the minimum number of numbers
- BingBang June 29, 2013