Zeta interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Zeta
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Application story
I applied to Zeta through their careers portal for an SDE-2 — Frontend role in Bangalore. To my surprise, I received a recruiter call the very next day. Things moved quickly, and within a couple of days, my interviews were scheduled.
Preparation
Duration: 3 months
Topics: JavaScript internals, easy to medium-level coding questions, understanding time and space complexity
Tip
Tip

Tip 1: Spend time learning JavaScript internals along with their implementations.

Tip 2: Spend time learning DSA basics and solve at least 150 questions.

Application process
Where: Company Website
Eligibility: No criteria, (Salary Package - 30 LPA)
Resume Tip
Resume tip

Tip 1: Tailor your resume to the specific job requirements.

Tip 2: Be prepared to answer questions about the details mentioned in your resume.

Interview rounds

01
Round
Hard
Face to Face
Duration60 minutes
Interview date21 Feb 2025
Coding problem6

1. What will be the output of following question?

console.log("begins");

setTimeout(() => {
 console.log("setTimeout 1");
 Promise.resolve().then(() => {
   console.log("promise 1");
 });
}, 0);

new Promise(function (resolve, reject) {
 console.log("promise 2");
 setTimeout(function () {
   console.log("setTimeout 2");
   resolve("resolve 1");
 }, 0);
}).then((res) => {
 console.log("dot then 1");
 setTimeout(() => {
   console.log(res);
 }, 0);
});

2. Implement listenTo() Function

The function had to listen to an object’s property (increment) and store the result of a provided function. On listener.call(), it should print the stored outputs.

let obj = {
 count: 1,
 increment: function () {
   return this.count++;
 },
 decrement: function () {
   return this.count++;
 },
};

let listner = listenTo(obj, "increment");

obj.increment(); // 2
obj.increment(); // 3
obj.increment(); // 4
console.log(listner().call); // [2, 3, 4];

3. Promise Comparison

Difference between Promise.all() and Promise.allSettled() with theory and examples.

4. Promise.all()

Implement Promise.all() from Scratch.

5. JavaScript Output-Based Question

// Problem 1: What is the output of the below program?
var fruits = ["apples", "bananas", "cucumbers", "dragonfruit"];

for (var i = 0; i < fruits.length; i++) {
 var time = 1000 - 100 * i;

 setTimeout(function () {
   console.log(i);
 }, time);
}

6. Modify the Function to Print Correct Fruit Names

var fruits = ["apples", "bananas", "cucumbers", "dragonfruit"];

for (let i = 0; i < fruits.length; i++) {
 var time = 1000 - 100 * i;

 setTimeout(function () {
   console.log(fruits[i]);
 }, time);
}

02
Round
Medium
Face to Face
Duration60 minutes
Interview date26 Feb 2025
Coding problem1

1. LCA of Two Nodes In A BST

Moderate
15m average time
85% success
0/80
Asked in companies
Morgan StanleyGoldman SachsAcko

You are given a binary search tree of integers with N nodes. You are also given references to two nodes 'P' and 'Q' from this BST.


Your task is to find the lowest common ancestor(LCA) of these two given nodes.


The lowest common ancestor for two nodes P and Q is defined as the lowest node that has both P and Q as descendants (where we allow a node to be a descendant of itself)


A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.


For example:
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,

The BST corresponding will be- 

Here, we can clearly see that LCA of node 1 and node 3 is 2.
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
2 rounds | 3 problems
Interviewed by Zeta
5136 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Zeta
3331 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Zeta
2287 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Zeta
3354 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29570 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6678 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5176 views
0 comments
0 upvotes