Pedro
BAN USER- 1of 1 vote
AnswersFind top 10 most frequent words in the past hour, day and month from twitter service. Given a streaming data such as tweets from twitter service, the objective is to find the top 10 frequent words in the past hour, day and past month at any instant of time.
- Pedro in United States for Maps| Report Duplicate | Flag | PURGE
Google Software Developer - 1of 1 vote
AnswersWrite a function that takes a magic number and a list of numbers. It returns true if it can insert add or subtract operations in the list of numbers to get the magic number. Otherwise, it returns false.
- Pedro in United States
For example:
f(10, [1,2]) = false. There's no way to add or subtract 1 and 2 to get 10.
f(2, [1,2,3,4]) = true. 1 + 2 + 3 - 4 = 2.
f(0, []) = true
f(1, []) = false
f(1, [1]) = true
f(0, [1]) = false| Report Duplicate | Flag | PURGE
Google Software Developer - 0of 0 votes
Answerstransactions = [
- Pedro in United States
{"payee": "BoA", "amount": 132, "payer": "Chase"},
{"payee": "BoA", "amount": 827, "payer": "Chase"},
{"payee": "Well Fargo", "amount": 751, "payer": "BoA"},
{"payee": "BoA", "amount": 585, "payer": "Chase"},
{"payee": "Chase", "amount": 877, "payer": "Well Fargo"},
{"payee": "Well Fargo", "amount": 157, "payer": "Chase"},
{"payee": "Well Fargo", "amount": 904, "payer": "Chase"},
{"payee": "Chase", "amount": 976, "payer": "BoA"},
{"payee": "Chase", "amount": 548, "payer": "Well Fargo"},
{"payee": "BoA", "amount": 872, "payer": "Well Fargo"},
There are multiple transactions from payee to payer. Consolidate all these transactions to minimum number of possible transactions.
HINT: Consolidate transitive transactions along with similar transactions| Report Duplicate | Flag | PURGE
Google Software Developer - 0of 0 votes
AnswerMake 100 HTTP GET requests to http://en.wikipedia.org/wiki/Main_Page and print the following statistics for the response time to stdout:
- Pedro in United States
• 10th, 50th, 90th, 95th, 99th Percentile
• Mean
• Standard Deviation
Your solution must be parallel. You must make at least N (say 10, but should be configurable). Use ExecutorService in Java for making the requests at a time.
Explain design choices, known limitations and edge cases.
What challenges did you face? How would you improve the code if you had more time?| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer - 0of 0 votes
AnswersGiven a dictionary and a string, find all the substrings that are valid words in dictionary.
- Pedro in United States
I was thinking of a Trie solution but I'm not sure a Trie will work easily to match sub words that begin in the middle of the string.| Report Duplicate | Flag | PURGE
Google Software Developer Algorithm
Java code ?
- Pedro July 11, 2018