8bitzz / blogs

0 stars 0 forks source link

Interview Questions #6

Closed 8bitzz closed 2 years ago

8bitzz commented 3 years ago

Data Structure and Algorithms

-- Design the algorithm to build a web crawler. -- Input: URL link of a web site -- Output: A list of all the links that will be crawled.

Object Oriented Programming

  • What is OOP? Why should we use OOP?
  • (Interface) Given a game where we have set of animals of difference races (Example: Dog, Bird, Cat, Lion). How to make all of the animal in the set expose a method named “fly” so we can ask them to fly even if they are not birds?
  • What is composition? Compare composition vs inheritance.
  • Explain class constructor
  • Tell the differences between Interface and Abstract class. Give some examples of each
  • Tell the differences between Override and Overload

Design Patterns

  • What are design patterns? Why should we use design patterns?
  • Describe the Singleton pattern
  • (Observer pattern) Given a Controller that has a property named “view” representing a view it controls. How does the view notify the controller when a certain event occurs?
  • (Architectural pattern) Explain microservices vs monolithic.
  • (Dependency injection) Given a class A which needs to use an instance of class B. How do you implement this idea without creating a direct dependency between 2 classes?
  • (Architectural pattern) Describe MVC. Provide a solution to solve the “Massive controller” issue.

Databases

  • How do you represent the n-n relationship in a relational database?
  • What is index used for?
  • Compare primary key and foreign key. Does a table have to have a primary key?
  • Compare SQL and noSQL databases.
  • How do you represent key-value structure in a relational database?
  • What is database normalization? Why should we need to normalize when designing a new database?

Networking

  • Compare UDP vs TCP
  • Compare GET vs POST, POST vs PUT
  • What happens from when we enter a domain (“google.com” for example) into browser to when the page is rendered?
  • Name some of the protocols belonging to the application layer (OSI) that you know
  • Describe the format of HTTP request and response
  • Name layers of OSI Model

Operating Systems

  • Compare thread vs process
  • Explain the term “Deadlock”
  • Define “cache”. Why do we need to use cache?
  • Which criteria can be used to classify Operating Systems?
  • What does 32-bit mean in Windows 32-bit OS?
  • What is round-robin scheduling?