Expedia Interview Question for SDE-2s


Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

Assumptions:
- All log files have a common root directory
- The UserID is logged exclusively in a line (without any other data in same line)

cd /var/log; find . -type f -name "*.log" | xargs cat | sort | uniq -c | sort -k1,1 -r | head -10

Of course replace log directory path and log file name format appropriately if given. It is also good to ask the interviewer if the assumptions are correct. If not, depending on the specifications, slight modifications need to be made to the command.

- Dilbert Einstein May 23, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Its Based on scenario to find top 10 user.
1. It could be based on number of visit to site in certain period of time.
2. Number of transactions
3. Amount of transaction.
If interview want to know algorithm approach or just brain storming than Solution is different. But ELKr(ElasticSearch, Logstash, redis)/Hadoop Based Mining is industry standard and production deployed solution of such problems.
1. logger with certain format
2. collect logs from each server (AWS/Cloud) at one place
3. Apply some mining/parsing/ GROK tool
4. Assigned them into ElasticSearch
5. Write API or ES query to fetch results.

- Anonymous June 12, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Its Based on scenario to find top 10 user.
1. It could be based on number of visit to site in certain period of time.
2. Number of transactions
3. Amount of transaction.
If interview want to know algorithm approach or just brain storming than Solution is different. But ELKr(ElasticSearch, Logstash, redis)/Hadoop Based Mining is industry standard and production deployed solution of such problems.
1. logger with certain format
2. collect logs from each server (AWS/Cloud) at one place
3. Apply some mining/parsing/ GROK tool
4. Assigned them into ElasticSearch
5. Write API or ES query to fetch results.

- Anonymous June 12, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More