ThoughtSpot Frontend Engineer Interview Experience:6 years

[ThoughtSpot] - [Senior FrontEnd Engineer] - [3 rounds]

Level: [Senior FrontEnd Engineer]
Education: [Graduate]
Years of Experience: [6]
Questions Asked:
Q: 1. Implement a middle ware pattern, given code snippet:

//Implement this
var Middleware = function() {
}

// usage
var middleware = new Middleware();

middleware.use(function() {
var self = this;
self.hook1 = true;
});

middleware.use(function() {
var self = this;
self.hook2 = true;
});

middleware.go(function() {
console.log(this.hook1); // true
console.log(this.hook2); // true
});

Q:2 Follow up: Output was getting printed with the delay of some time, it is required to not delay the output, used promises, and an implementation without promises.

ROUND2:

Q-1 Create a Task Runner which can run at max ‘n’ tasks in parallel. At any given point only ‘n’ tasks can run in parallel and any extra tasks needs to wait until any task from running has finished executing.

Q-2: Implement DeepCompare
let obj1 = {
name: “A”,
address: {
city: “Bangalore”,
},
x: null,
};
let obj2 = {
name: “A”,
address: {
city: “Bangalore”,
},
y: null,
};

ROUND3: System Design Round:
Design Project Tracker (JIRA)