My Frontend Interview Experience at Blinkit: A Smooth Yet Challenging Ride
Overview
This document details a candidate's interview experience for a Frontend Developer position at Blinkit. The process involved a resume review, technical assessments, and behavioral questions, providing a comprehensive evaluation of the candidate's skills and suitability for the role.
Interview Rounds
Round 1: Technical Interview
The initial interview, conducted by an SDE-2 at Blinkit, commenced with a discussion of the candidate's resume and previous projects at CLEAR, PerkPass, and other ventures. The technical assessment comprised the following challenges:
JavaScript Nested Object Transformation
-
Problem: The candidate was tasked with flattening a deeply nested JavaScript object into a flat structure.
const input = { user: { name: "John", address: { city: "New York", zip: "10001" } } }; // Expected Output: // { // "user.name": "John", // "user.address.city": "New York", // "user.address.zip": "10001" // } -
Solution: The candidate employed a recursive approach using
forEachto iterate through the object's keys and construct the flattened structure.function flattenObject(obj, parent = '', result = {}) { Object.keys(obj).forEach(key => { const propName = parent ? `${parent}.${key}` : key; if (typeof obj[key] === 'object' && obj[key] !== null) { flattenObject(obj[key], propName, result); } else { result[propName] = obj[key]; } }); return result; } console.log(flattenObject(input)); -
Discussion: The interviewer inquired about the choice of
forEachovermap. The candidate clarified thatforEachis more appropriate for side effects (modifying an external object), whereasmapis intended for creating new arrays.
DSA Challenge: Next Permutation
-
Problem: Given an array of integers, find the next lexicographical permutation. If no such permutation exists, rearrange the array to its lowest possible order.
-
Sample Input:
[1, 2, 3] -
Expected Output:
[1, 3, 2] -
Solution:
Original Source
This experience was originally published on medium. Support the author by visiting the original post.
Read on medium