Amazon Interview Question for Software Engineer in Tests






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

similar kind of question asked by microsoft

- karan August 30, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Let's use the traditional algorithm in which we use the stack for evaluating an expression involving paranthesis.This will check for the proper nesting of elements.

- Guru August 30, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Stack should do the trick i believe. Push when you encounter a open tag of any sort and pop when you encounter a close tag of any sort. When the end of file is reached the stack should be empty !

- Vijay September 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Vijay,

With ur solution, we can only check if there are equal number of openings and closings but how can we find out if every closing corresponds to an opening

- nthuziast March 15, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I got it. If we store the stack with the tag names, latest push name should match with the latest pop name. else its not valid

- Anonymous March 15, 2011 | 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