Amazon Interview Question for Software Engineer / Developers


Team: AWS
Country: United States
Interview Type: Phone Interview




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

I'm from C# background I know very few about C++.
In general the below points comes to my mind while start writing any new class.

If interviewer is mainly looking for C++ related features, below list might not help much.

1. OOPS Features and Concepts (Basic private/public members, properties, methods etc. Constructors, destructors for C++ classes).
2. OOPS/SOLID Principles.
3. Design Patterns.
4. IoC.

- Srigopal Chitrapu April 29, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

That about covers everything Sri. What is LoC?

- puneet.sohi April 29, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Its not LoC Puneet.

It is Inversion of Control - Dependency Injection.
Not sure if it is really applicable for C++ as I am not played with real time C++ apps nuch.

- Srigopal Chitrapu April 29, 2014 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

My understanding is as following apart from the above answers. Please correct me if you think something is not feasible.
1. We need to think whether we want to create an abstract class (making some of its method as pure virtual). If there is a possibility of extending the behaviors of this class we can make some of its member function as virtual.
2. On the other hand, if the class has to used with different data types and there is not much change in the behavior (i.e. member functions) for data types, we can create a template class. For example while writing any container class we may think of making it a template class, so that different data types can be stored inside the container class.
This would depend upon the business use case for which we are designing/writing the class.

- learner123 April 29, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

My understanding, actually some common senseļ¼š
1. What's the class used for? You cannot include everything or too much in one class.
2. You are going to create an abstract class or a class inheriting another?
3. Namespace, Constructors, Members, Properties, Methods, etc.
4. The role of this class in your design/architecture/model.
5. ...

- Eric Lei April 30, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1.private variables.
2.public get and set methods
3.multiple constructor-without args,with 1,2,3,... args,copy constructor
4.do i need to overload operators? +,-,=. eg.in matrix class overloading + will simplify usage
5.destructor. free memory if you allocated any
6.Do I need virtual functions or an abstract class or just a simple class?

- neerajlakhotia08 June 21, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This looks like to me more of Strategy Pattern question where you define what you need in class and what should be as interface.

- Raj July 27, 2014 | 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