Adobe Interview Question for Software Engineer / Developers


Country: India
Interview Type: In-Person




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

Hashing with min-heap.

If the count of word is greater than the top of the min heap then replace this with the top of the min-heap. So by doing this min-heap size will not be greater than 10.

- Psycho September 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

question id=14548838

- Psycho September 24, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

"Most optimized". Optimized for what?

- Anonymous September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think heap is the best solution. We have to maintain a 10 element maxheap (maximum element at top) - elements will be kept in the heap along with their frequency. Before inserting into the heap we have to check if the word exists in the heap; if so increase the frequency of the heap and rearrange the heap on the basis of frequency.

- Atri Mandal September 18, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can you please explain your approach. I don't think just max heap of size 10 can work.
for example if you have 30 elements and 10 elements of count 2 and 1 of count 3. lets say this 1 element came as 1st spot and rest 2 are last two. As per your approach, you will get this element removed since after 21st element, this will be of least count.

- Anonymous October 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

suffix tree would be an ideal chioce i suppose .....

- vin September 19, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use hashing.(rationale glambing)

- Vimal September 22, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Build a trie of the list. each node in the trie would contain the occurrences of the word till now

- nikunj165 September 22, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

Huffman code algorithm

- Anonymous September 17, 2012 | 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