Interview Questions
https://github.com/hxu296/leetcode-company-wise-problems-2022?tab=readme-ov-file
- Review on the 8 Data Structures:
- Arrays
- Tree
- Stacks
- Queue
- Hash Table
- Linked List
- Graph
C++ Interview Questions
Short Questions
- Describe the conditions under which a method call uses the static type vs when it uses the dynamic type.
- Explain why we prefer to put implementations in a .cc file vs in a .h file.
- Describe at a high level how a templated class is compiled.
- Define in your own words what an invariant is.
- Describe the steps of the Object Construction sequence. How do they relate to those of the object destruction sequence?
- What is the difference between Overloading and Overriding?
- Give two differences between overloading operators as a method vs as a standalone function.
- Give one example where an operator overload has to be defined as a standalone function, and one where it has to be defined as a method.
- Explain the different situations where we would prefer pass-by-value, pass-by-reference, and pass-by-constant-reference.
- Give the definition of an lvalue, give the definition of an rvalue.
- Describe the mechanism behind the copy-swap idiom, and why one one may wish to use it.
- For a container class C, list what methods must be defined to implement an iterator for C.
- List two advantages to using a Makefile for build automation
- Explain differences between the waterfall and agile methodology of software development.
- Describe the conditions that indicate an owns-a relationship, and a has-a relationship
Also useful in CS247.
Long Questions
System Design
I’ve never had system design questions but from what Sophia told me, she always gets them. Probably if you interview with big companies since they have multiple rounds…
Java Questions
- Is Java platform independent if then how?
- Features of Java
- Secured