My Interview Experience for Zepto SDE-2 Frontend Role
Overview
This case study outlines a candidate's interview experience for the Software Development Engineer 2 (SDE-2) Frontend position at Zepto. The process was designed to evaluate the candidate's technical skills and problem-solving capabilities. This document provides a structured breakdown of the interview rounds and key takeaways.
Interview Rounds
The interview process consisted of two technical rounds.
Round 1: Technical Interview
This round began with an introduction and a discussion of the candidate's resume, focusing on previous projects and technologies. The interviewer probed the specifics of the candidate's contributions.
Question 1: Infinite Currying
The candidate was asked to implement infinite currying in JavaScript. The solution required a strong understanding of closures, function length properties, and argument management.
function curry(func) {
let args = func.length;
const totalArgs = [];
return function inner(a) {
args--;
console.log(args, totalArgs);
if (args === 0) {
return func(...totalArgs);
}
totalArgs.push(a);
return inner;
};
}
function sum(a, b, c) {
return a + b + c;
}
sum.length = 3;
let curriedSum = curry(sum);
console.log(curriedSum(2)(3)(4)); // Output: 9
The curry function transforms a given function into its curried equivalent. It leverages func.length to determine the expected number of arguments. The inner function recursively collects arguments until the required count is met, then invokes the original function with the accumulated arguments using the spread operator.
Question 2: Countdown Timer
The candidate was tasked with creating a countdown timer in JavaScript with the following features:
- Start/Stop functionality
- Pause functionality
- Reset functionality
- Time display in HH:MM:SS format
This question assessed the candidate's ability to manage time-based operations, manipulate the DOM, and handle events. The candidate implemented the timer using setInterval, maintained state to track the timer's status, and ensured clear time formatting logic.
Round 2: React-Focused Technical Interview
This round concentrated on React.js concepts and practical implementation.
Question 1: Stepper Component
The candidate was required to build a Stepper component in React, allowing users to navigate a multi-step form. The component needed to persist form data across different steps. An example stepper was provided.
Original Source
This experience was originally published on medium. Support the author by visiting the original post.
Read on medium