CoolGuy
BAN USER
- 0of 0 votes
AnswersThere are N (N > 20) team, each team will play 'M' (say M =3) league match against every other team. Design various classes, and write the code and algorithm to find the winner.
- CoolGuy in India
Note: One match can be played on a single day, as there is just one stadium.
Note: No team should play matches on consecutive days.
Note: Algorithm should come up with Quarter Final, Semi Final, and Final matches.
Follow-up Question: If N is odd or even.
How your design will be modified if there are 'S' no. of stadiums.| Report Duplicate | Flag | PURGE
Adobe SDE-3 - 0of 0 votes
AnswerYou need to design a new YouTube feature where userA is uploading a video and userB (friend of userA) gets notified for the video and wants to watch the same video in real time (i.e. even the video is not completely uploaded but we want to enable the other user to watch it).
- CoolGuy in India
How would you tackle the situation when userB wants to view the content starting from a position which is not yet uploaded.
Draw block diagram for this problem identifying the different components.| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 1of 1 vote
AnswersHow would you like to efficently find the total number of possible ways with which given string may be converted to whole dictionary words.
- CoolGuy in India
Example :
String = “Dogeatscare”
possible combinations – “Dog, eat, scare ” and “Dog, eats, care”
output is 2.| Report Duplicate | Flag | PURGE
Amazon SDE-3 - 0of 0 votes
Answersclass QueryVector
- CoolGuy in India
{
QueryVector(vector values)
{
// Implement
}
vector GetIndices(list filters)
{
// Implement
}
}
Say for example vector is like
{“an”, “apple”, “day”, “keeps”, “doctor”, “away”, “apple”, “iphones”, “cool”, “doctor”, “recommends”}.
GetIndices(“apple”) should return (1, 6)
GetIndices(“doctor”,”cool”) should return (4,8,9)
GetIndices(“random”) should return empty vector ()
GetIndices(“random”,”keeps”,”day”,”doctor”) should return empty vector (2,3,4,9)
Important:
1. There can be millions of values in the input vector of string
2. GetIndices can be called repeatedly and it should be optimized
3. How storage optimization is considered and bitmaps etc are used.| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersDesign a task execution service, which accepts tasks from clients and runs them and returns result. Following is how the
- CoolGuy in India
Client Registration (client name, callback method)
Submit Job to service
Once executed service will return the result to client
Lets assume that 20k jobs are getting submitted per second, you need to scale it in such a way that we are able to process as much jobs per second as possible.
Further questions:
So the components are going to be a load balancer, workstations, cache, task runner and DB. How will you make sure that data is consistent among them, mimimal duplication of data and every job is ran only once.
If any machine is down, say DB, workstation etc. how that is going to be handled.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer
Interviewer was not much happy about the solution I gave using map, his concern was that it won't scale.
I talked about using trie tree, he further asked how would you scale it, and how you are going to make sure that for million string it would suffice.
Also the concern was what if the whole string can't be loaded into memory.
Interviewer wanted to have job runner(s) separate from the worker which would be responsible of running the job.
So Worker is responsible for getting the jobs from the client and returning the result.
Only question is how a job runner would return the result upon completion, will it save the worker host name, if that worker is not available what would happen ?
RepOliviaJBlack, Consultant at Apkudo
I am Olivia from San Diego. I am working as a checker in the Thom McAn Store company. My strong ...
Repcarlawbartlett, Accountant at ASU
Managed a small team managing toy elephants for the underprivileged. A real dynamo when it comes to managing vashikaran mantra ...
Repmanueladturner, Associate at Accenture
I am a content writer with years of successful track record of writing concise and fact-filled content on different topics ...
Repmadan@kukooo.in, Analyst at Absolute Softech Ltd
I am a content writer with years of successful track record of writing concise and fact-filled content on different topics ...
RepMaryLopal, Applications Developer at Coupondesh
I am a 41 year old dermatologist in Saginaw USA. I do like to face the challenges . I'm active ...
What are the pros and cons of using dictionary (hash) vs Trie.
- CoolGuy December 09, 2017