This repository contains a list of Back-End interview topics that I had to review, or want to deepen.
Feel free to contribute, it would be highly appreciated!
-
-
What are the programming paradigms supported by JavaScript?
-
What is the difference between classical inheritance and prototypal inheritance?
-
What is asynchronous programming, and why is it important in JavaScript?
-
What is callback hell and how can it be avoided? What is the point of Promises?
-
What is the difference between between global scope, and local scope (function scope, and block scope)?
-
What is hoisting, and IIFE?
-
What is closures? How to emulate encapsulating using it?
-
What are the different patterns of function invocation in JavaScript? And what is the value of
this
in each one them? -
What is the different between
.__proto__
and.prototype
? -
How to change the context of functions using
.call()
,.apply()
, or.bind()
? -
What do
Object.assign()
andObject.create()
do? -
What do
Promise.race()
andPromise.all()
do? -
What happens when we call a function with the
new
keyword? -
What is the output of this code:
for (var i = 0; i < 3; i++) { setTimeout(function() { console.log(i); }, 1000 + i); }
What will be printed on the console if we change
var i
withlet i
? -
Consider the following code:
(function() { var a = b = 5; })(); console.log(b);
What will be printed on the console? If the strict mode was enabled by using the
'use strict';
, what will be the output? -
Define a
repeatify
function on the String object. The function accepts an integer that specifies how many times the string has to be repeated. The function returns the string repeated the number of times specified. For example:console.log('hello'.repeatify(3));
It should print hellohellohello.
-
What is the result of the following code snippets?
var fullname = 'John Doe'; var obj = { fullname: 'Colin Ihrig', prop: { fullname: 'Aurelio De Rosa', getFullname: function() { return this.fullname; } } }; console.log(obj.prop.getFullname()); var test = obj.prop.getFullname; console.log(test());
const obj1 = { value: 'hi', print: function() { console.log(this); }, }; const obj2 = { value: 17 }; obj1.print.call(obj2); new obj1.print();
Resources:
-
[⬆] return to Table of Contents
-
Is everything that’s asynchronous in Node.js handled by the
libuv
's Worker Pool? -
What are the phases of the Event Loop?
-
What do you know about Worker Threads module in Node.js?
-
What is the difference between
process.nextTick()
,setTimeout()
,setInterval()
, andsetImmediate()
? -
What are the Timers functions of Node.js?
-
What can be done if a Timeout or Immediate object needs to be cancelled?
-
What will printed by running the following code:
const fs = require('fs'); fs.readFile(__filename, () => { setTimeout(() => { console.log('timeout'); }, 0); setImmediate(() => { console.log('immediate'); }); process.nextTick(() => { console.log('nextTick'); }); });
-
Explain what is Reactor Pattern in Node.js?
-
Rewrite the code sample without try/catch block:
async function check(req, res) { try { const a = await someOtherFunction(); const b = await somethingElseFunction(); res.send("result") } catch (error) { res.send(error.stack); } }
-
What is Globals in Node.js? (explain global, process, and buffer)
-
What is the use of Underscore (
_
) in Node.js? -
What are Error First Callbacks in Node.js?
-
How to gracefully shutdown/kill Node.js process? (explain
process.kill()
) -
What is the difference between
readFile()
vscreateReadStream()
? -
What is the
EventEmitter
in Node.js? -
How many types of Streams are present in Node.js?
-
How to solve Process out of Memory Exception in Node.js?
-
What is the use of DNS module in Node.js?
-
What's wrong with the following code snippet? (explain timing attacks)
function checkApiKey (apiKeyFromDb, apiKeyReceived) { if (apiKeyFromDb === apiKeyReceived) { return true } return false }
-
How does Node.js support multi-processor platforms, and does it fully utilize all processor resources? (explain Cluster module)
-
Consider the following code snippet:
{ console.time("loop"); for (var i = 0; i < 1000000; i += 1){ // Do nothing } console.timeEnd("loop"); }
Resources:
- 7 Hardest Node.js Interview Questions
- Top 20 Interview Questions on Node.js
- Frequently asked: Node JS Interview Questions and Answers
- 8 Essential Node.js Interview Questions
- Node.js Interview Questions and Answers
- Express and Node JS Interview Questions
[⬆] return to Table of Contents
- What are the pros and cons of functional programming vs object-oriented programming?
- What are the four pillars of OOP? (A brief description for each one)
- What is dynamic or run time polymorphism?
- What is static/early binding and dynamic/late binding?
- When is classical inheritance an appropriate choice?
- When is prototypal inheritance an appropriate choice?
- What does “favor object composition over class inheritance” mean? When should we choose inheritance over composition?
- When it is more appropriate to use a structure (struct) instead of a class?
- What are abstract classes? What are the distinct characteristics of an abstract class?
- How is method overriding different from method overloading?
- What is the difference between cohesion and coupling?
- Why should we strive for "high cohesion, and low coupling" in designing a system?
- Explain the concept of destructor/deinitializer?
- What is LSP (Liskov Substitution Principle) and what are some examples of its use?
- What is the difference between association, aggregation and composition?
[⬆] return to Table of Contents
- What does the term network topology refer to? Describe the star topology and its cons?
- What are the layers of the OSI reference model? (A brief description for each layer)
- What are the layers of the TCP/IP model? (A brief description for each layer)
- What are the differences between IPv4 and IPv6?
- What are the differences between TCP and UDP?
- What are DNS, DHCP, and NAT?
- What does the tracert tool (Windows) or the traceroute tool (Linux) do?
- What are CDNs? What are its pros and cons?
- What are the differences between reverse proxies and forward proxies?
- What does the term AAA mean in network security?
- What is DoS/DDoS? How can protect servers from it?
[⬆] return to Table of Contents
-
- What is the Microservices architecture? And what are its pros and cons?
- What are the differences between Monolithic, SOA and Microservices?
- What is the API Gateway pattern?
- What are the decomposition patterns used in Microservices? (briefly describe decomposition by business capability, decomposition by subdomain, and self-contained services)
- What are the deployment strategies used in Microservices?
- What are the challenges faced while working with Microservices?
- What is Domain Driven Design (DDD)?
- What is Ubiquitous Language (UL) and what is its uses in DDD?
- What is the Distributed Transaction pattern?
- What is the Bounded Context pattern?
- What do you understand by Contract Testing?
- What is End to End Testing in Microservices?
- What are Reactive Extensions in Microservices?
[⬆] return to Table of Contents
-
Suppose we have two tables
tbl1
andtbl2
; Each of these tables contains one column on which join condition has been defined. The tabletbl1
contains the columncol1
and the tabletbl2
contains the columncol2
.- What will the outcome of the following inner join query?
SELECT a.col1, b.col2 FROM tbl1 a INNER JOIN tbl2 b ON a.col1 = b.col2
- What will the outcome of the following left outer join query?
SELECT a.col1, b.col2 FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.col1 = b.col2
- What will the outcome of the following right outer join query?
SELECT a.col1, b.col2 FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.col1 = b.col2
- What will the outcome of the following full outer join query?
SELECT a.col1, b.col2 FROM tbl1 a FULL OUTER JOIN tbl2 b ON a.col1 = b.col2
In case of: - Join columns having unique values. - Join columns having duplicate values. - One Join table contains Null value. - Both tables containing Null values.
-
Consider the following
staffs
table:id first_name last_name manager_id 1 Genna Jakson NULL 2 Adam Ahmed 1 3 Kali Boyer 2 4 Layla David 2 5 Ali Mohamed 3 The
staffs
table stores the staff information such asid
,first_name
, andlast_name
. It also has a column namedmanager_id
that specifies the direct manager.Use self join and recursive common table expression (CTE) to get who reports to whom?
-
Describe and give an example of the cross join?
[⬆] return to Table of Contents
- What is the difference between Docker and VM (Virtual Machine)?
- What is Docker?
- What is the advantage of Docker over Hypervisors? (briefly describe What is the main difference between the approaches of Docker and standard hypervisor virtualization?)
- What is Docker Image and Container?
- What is the default Docker network driver, and how can you change it when running a Docker image?
- What are the four different restart policies in Docker?
- What is Docker Compose? What can it be used for?
- What is Docker Hub and what is the other type of Docker Image Registry?
- What are the possible ways of using insecure Docker image registries? What are the possible ways of using insecure Docker image registries?
- What is Docker Swarm? What can it be used for?
- What is Dockerfile? What can it be used for?
- Is there any data loss when the Docker container exits?
- Why
docker-compose down
may take10
seconds to recreate or stop? (briefly describeSIGTERM
andSIGKILL
) - What’s the difference between
docker-compose up
,docker-compose run
, anddocker-compose start
? - What’s the benefit of Dockerizing?
- Is there a possibility to include specific code with
COPY
/ADD
or a volume? - What are the differences between the
docker run
and thedocker create
? - What are the various states that a Docker container can be in at any given point in time?
- What is the preferred way of removing containers -
docker rm -f
ordocker stop
then followed by adocker rm
? - What does the volume parameter
-v
do in adocker run
command? - What is the use of the
docker save
anddocker load
commands? - Is there any problem with just using the
latest
tag in a container orchestration environment? What is considered best practice for image tagging?
[⬆] return to Table of Contents
- What is JSON Web Token? And when to use it?
- What is the JSON Web Token structure? And How does it work?
- What is OAuth 2.0? What are its roles?
- What are the five grants for acquiring an access token in OAuth 2.0?
[⬆] return to Table of Contents
-
What is Git? And what it is used for?
-
What are the pros and cons of distributed version control systems like Git over centralized ones like SVN?
-
What is Git fork? What is difference between fork, branch and clone?
-
What is the difference between
git pull
andgit fetch
? -
How to revert previous commit in git?
-
What is
git cherry-pick
? -
What is the difference between HEAD, working tree and index, in Git?
-
Explain the Gitflow workflow?
-
What is
git stash
? And when to use it? -
How to remove a file from git without removing it from the file system?
-
How do you find a list of files that has changed in a particular commit?
-
What is
git bisect
? How can you use it to determine the source of a (regression) bug? -
When to use
git rebase
instead ofgit merge
? What does the interactive rebasing do? -
What are the different ways we can use to refer to a commit?
Resources:
[⬆] return to Table of Contents
-
What is Test Driven Development (TDD)? And what is its process?
-
What is Data-Driven Development (DDD)? And what is its process?
-
What is Keyword Driven Development (KDD)? And what is its process?
-
What is Behavior Driven Development (BDD)? And what is its process?
-
What is the difference between Fake, Mock, and Stub?
-
What are the various types of Unit Testing?
-
What do you know about Mike Cohn’s Test Pyramid?
-
What is Code Coverage? And what are its various techniques?
-
How is Unit Testing different from Integration Testing?
Resources:
- Unit Testing Interview Questions and Answers
- The 100% Code Coverage Myth
- Code Coverage: The Metric That Makes Your Tests Worse
- 5 Questions Every Unit Test Must Answer
[⬆] return to Table of Contents
- What is the difference between static array and dynamic array?
- Compare the time complexity and space complexity of searching, insertion, and deletion for the following data structures:
- Dynamic Array
- Linked List
- Hash Table (Hash Map)
- Binary Search Tree (BST)
- Heap (Max Heap/Min Heap)
- Red-Black Tree
- AVL Tree
- Compare the time complexity and space complexity for the following sorting algorithms:
- Bubble Sort
- Insertion Sort
- Selection Sort
- Merge Sort
- Heap Sort
- Quick Sort
- Counting Sort
- What is the difference between inorder, preorder, and postorder tree traversal algorithms?
- What is the difference between breadth-first-search (BFS) and depth-first-search (DFS)?
[⬆] return to Table of Contents
- What is the Agile Software Development standing for? And why we should use it!
- What is the difference between the Agile and Waterfall software development models?
- What is the four main principles of the Agile Software Development? (Agile Manifesto)
- How does Agile work?
- List some Agile software development (or system development) methodologies?
- What is the difference between Kanban and Scrum Agile frameworks?
- What is the duration of a Scrum sprint?
- What is the Scrum of Scrums?
- What is the term increment standing for, in Scrum context?
- Explain the scrum poker/planning poker technique?
- What is the Release candidate?
- What is a story point in the Scrum?
- What are the main roles in the Scrum?
- What are the Sprint Planning meeting, Stand-up meeting, Definition of Done (DoD) meeting, and Sprint Retrospective meeting?
[⬆] return to Table of Contents