cswork / libraryOpen practice workspace

Interview guides · AIG PC Global Services

AIG PC Global Services Software Engineer Interview Guide

AIG PC Global Services Software Engineer interview guide: reported rounds, JavaScript, React, DSA and SQL questions, puzzles, and a 7-day prep plan.

The 60-second brief

AIG PC Global Services belongs to AIG's Property Casualty business, part of an insurance and financial services group. The role description candidates see ties the software to underwriting, claims processing and the digital experience of users, so the code encodes business rules at enterprise scale. The listed work covers web applications and services in JavaScript, React and Node.js, REST APIs, updating older systems (including splitting monoliths into microservices), connecting third-party APIs, and real-time data flows over WebSockets. Around the code, the role includes agile ceremonies, turning product requirements into technical specifications, code review, mentoring junior engineers and working with QA before releases. For interview purposes that means a web-and-backend engineer who also has to explain decisions to people outside engineering.

This guide is for candidates applying as a Software Engineer, from recent graduates with strong project portfolios to mid-level engineers with full-stack experience, which are the levels the role description mentions. It covers the four reported rounds, all 18 reported questions (data structures and algorithms, JavaScript and React, REST, OOP, SQL, operating systems, your project's schema, two puzzles and four behavioral prompts), and a seven-day plan. It makes no claims about pay or exact timings beyond what candidates report.

Candidates report four stages over roughly 3-5 weeks: Resume Screening, an Online Aptitude Test, two to three Technical Interview Rounds, and a Final HR Round.

Focus areas

  • JavaScript
  • React
  • Asynchronous Programming (Promises/async)

Overview

The reported questions fall into five groups. Four are data-structure problems: balanced parentheses with a stack, cycle detection in a singly linked list, sorting an array of only 0s and 1s, and a medium array-manipulation problem. Four are web questions: how JavaScript handles asynchronous work, Promises including a hand-written implementation, React's virtual DOM and Hooks, and REST design. Four are core CS and database questions: OOP, a SQL join with a filter, operating-system threading and memory, and the schema of your latest project. Two are puzzles (25 horses, and a Gurugram to Uttarakhand travel estimate), and four are behavioral.

Candidates also describe project discussion as a large part of the technical rounds, and the topics that show up most often in reported loops are JavaScript, React, asynchronous programming, explaining a project technically, and general problem solving. The role requirements candidates describe name JavaScript, React and Node.js as must-haves, with AWS and Socket.io as extras, plus relational databases, SQL, OS, OOP and DBMS. So the useful preparation is breadth across the fundamentals plus real depth on the few web topics where you can be asked to write code (a Promise, a Hook, a query), not obscure algorithms.

Because the reported stack is web-centred and the project is a recurring subject, spend a fixed share of your time on your own work: the data model, the path of a request from the database through the backend to the UI, how authentication (JWT is mentioned) was done, and what you would change. The later days of the plan move from technique to speaking aloud, since most of these answers are explained rather than only typed.

The AIG PC Global Services interview process

Each stage below describes what candidates report about its format and which reported question types you can practise for it.

Resume Screening

Candidates report that the process starts with a review of your resume against the role. Reports do not mention a live conversation at this stage, so treat the resume itself as the first thing being read. Reports also say later technical rounds are built around the projects on it, which makes this the moment to decide what you can defend. Keep the skills section aligned with the requirements candidates describe (JavaScript, React, Node.js, SQL, DSA fundamentals, with AWS and Socket.io as extras) and list only what you could discuss in depth.

What to demonstrate

  • How well your listed skills and projects line up with a web-focused Software Engineer role
  • Whether your project entries state the problem, your contribution and the technologies clearly

How to prepare

  • For every project, write three lines: the problem it solved, the part you built, and the stack you used. Check that every technology on the page appears in at least one project.
  • Remove or demote anything you could not explain for several minutes, such as a framework you touched once or an AWS service you only read about.
  • Draw the data model and the request path (database, backend, UI) of your most complex project now; the same material answers the schema question and the project walkthrough later.

Online Aptitude Test

Candidates say an online test may be used to check basic technical skills, and that it is mentioned mostly for campus and early-career hiring, so lateral candidates may not meet it. Its content is not detailed in reports, so prepare for the fundamentals the loop names: data structures and algorithms, logic and puzzles, and short recall of OOP, OS and DBMS ideas. Read each problem fully and note your assumptions before you answer.

What to demonstrate

  • Basic technical skills, as candidates describe the test
  • Readiness on the fundamentals the loop names, which you can self-check by solving the reported problem types

How to prepare

  • Solve the reported problem types without help: balanced parentheses, cycle detection in a linked list, sorting a 0/1 array, and a medium array problem.
  • Revise the OOP pillars, process versus thread, and a basic join and filter in SQL so you can answer them in a sentence or two.
  • Practise reading a problem fully, writing the edge cases first (empty input, single element) and then the code, so you do not lose marks on a missed case.

Technical Interview Rounds

Reports describe two or three technical interviews that mix coding, design questions and project talk, sometimes with mixed panels that include both engineering and HR people. Reported questions of the right types for this stage include the coding problems, JavaScript asynchrony and Promises, React internals, REST design, SQL, OS and OOP concepts, and your own project's schema and architecture. Expect to talk through reasoning aloud as well as write code.

What to demonstrate

  • Working code and clear time and space complexity for data-structure problems
  • Depth in JavaScript, React, Node.js and REST, including how they work and not only how to use them
  • Ability to explain the design, data flow and trade-offs of your own project

How to prepare

  • Rehearse writing a minimal Promise (states, then-chaining, rejection) and predicting the output order of a snippet mixing setTimeout, Promises and await.
  • Prepare a spoken tour of your best project: architecture, schema and entity relationships, authentication, one hard decision, and one thing you would redesign.
  • Write out answers to the React question (reconciliation, keys, useEffect cleanup and dependency arrays, useMemo and useCallback) and to REST design (resources, verbs, status codes, pagination, idempotency, versioning).
  • Practise one small design question: a claims-submission service with a REST API, a relational schema, JWT authentication and a WebSocket status feed (Node.js, Socket.io). Sketch the endpoints, tables and the message that pushes a status change.

Final HR Round

Reports say the last stage is an HR interview on how you fit the culture and where you want your career to go. The reported behavioral and HR questions are the four prompts in this guide: two gaps in your skills, where you see yourself in five years, willingness to relocate, and a technical roadblock. Reports also mention that confidence and clear communication matter at this stage, so prepare answers you can say plainly and specifically.

What to demonstrate

  • Cultural fit, career aspirations and confidence, which candidates report this stage covers
  • Fit between your career direction and a software engineering role
  • How you communicate about a technical problem you handled

How to prepare

  • Write and say aloud the answers to the four reported prompts, each with concrete detail (project, action, result) rather than general statements.
  • Decide in advance your real position on relocation, including any conditions, so the answer is short and consistent with your resume.
  • Prepare two or three questions about the team and the work that show you read about the role.

Where candidates lose points

Listing a technology on the resume that you cannot explain beyond its name

Candidates report that technical rounds are built around the projects on your resume. For each technology listed (Node.js, React, AWS, Socket.io, SQL), prepare what you used it for, one alternative you considered, and one problem you hit. Delete what you cannot cover.

Writing a custom Promise that only handles the happy path

Implement the three states, a callback queue, then() returning a new Promise for chaining, rejection handling, and asynchronous callback execution (queueMicrotask). Check it against the output-order behaviour of the native one, and be able to explain why then handlers never run synchronously.

Using a built-in sort on the binary array, or missing edge cases on the stack and linked-list problems

For 0s and 1s, say a counting pass plus a rewrite, or a single two-pointer pass, beats an O(n log n) sort. For parentheses, handle a closing bracket on an empty stack, leftover openers, and mixed bracket types. For the cycle, mention the hash-set baseline, then state and code the O(1)-space two-pointer method.

Blurting a number for the 25 horses or the Gurugram estimate without showing the steps

For the horses, state your grouping logic and justify each race instead of reciting the count. For the estimate, list assumptions (population, share travelling, travel mode, vehicle occupancy), multiply them in the open and sanity-check the total.

Giving rehearsed, generic answers to the weaknesses, five-year and relocation questions

Name two real gaps with the action already started, a growth path tied to engineering skills, and a plain yes, no or conditional on relocation. Each answer should include a concrete detail only you would have.

Questions & practice

Given a string of parentheses, write a function using a stack to check if they are balanced.

Medium · Data Structures & Algorithms

Approach

  1. Scan left to right with a stack: push every opening bracket, and on a closing bracket pop and compare against a map such as ')' -> '(' , ']' -> '[', '}' -> '{'. A mismatch, or a pop from an empty stack, returns false at once.
  2. After the scan the string is balanced only if the stack is empty; forgetting this check wrongly accepts input like "((".
  3. Time is O(n) and worst-case space is O(n) (all openers). If the input is guaranteed to contain brackets only, an odd length can be rejected immediately as a cheap early exit; if other characters are ignored, odd length tells you nothing.
  4. With only one bracket type, a counter that must never go negative and must end at zero replaces the stack and gives O(1) space; say why that trick fails once types can interleave, as in "([)]".
  5. Test the empty string, a single closer, "(]", "([)]" and deep nesting, and decide whether non-bracket characters are ignored or rejected.

Follow-up

  • How would you return the index of the first unmatched bracket instead of a boolean?
  • What is the minimum number of insertions needed to make the string balanced?
  • How would you skip brackets that appear inside quoted string literals?

Write a program to detect a cycle in a singly linked list.

Medium · Data Structures & Algorithms

Approach

  1. Start with the simple version: walk the list storing visited node references in a hash set; a repeated reference means a cycle. O(n) time and O(n) space.
  2. Improve to Floyd's tortoise and hare: slow moves one node, fast moves two; if fast or fast.next becomes null there is no cycle, and if they meet there is one. O(n) time, O(1) space.
  3. Guard the null checks in the loop condition (fast && fast.next) so an empty list, a single node and an even-length list do not throw.
  4. To find where the cycle starts, reset one pointer to the head after the meeting and advance both one step at a time; they meet at the cycle entry. To get the cycle length, keep one pointer fixed and count steps until the other returns.
  5. Name the edge cases: a single node pointing to itself, a cycle back to the head, and a cycle covering only the last two nodes.

Follow-up

  • Why does resetting one pointer to the head land both pointers on the cycle's first node?
  • How would you remove the cycle once you have found its entry?
  • How would you check whether two singly linked lists intersect, using the same pointer ideas?

Implement an algorithm to efficiently sort a binary array (an array containing only 0s and 1s).

Medium · Data Structures & Algorithms

Approach

  1. Counting version: count the zeros in one pass, then write that many 0s followed by 1s. O(n) time, O(1) extra space, two passes.
  2. Single-pass version: two pointers at both ends; advance left past 0s, move right back past 1s, and swap when left holds a 1 and right holds a 0, stopping when they cross. O(n) time, O(1) space.
  3. Point out that a general comparison sort costs O(n log n) and is unnecessary because only two values exist; this is a partition, not a full sort.
  4. If each element is a record keyed by 0/1 and the original order inside each group must survive, the swap version is not stable; a counting pass into an output buffer keeps order at the cost of O(n) extra space.
  5. Test an empty array, all 0s, all 1s, a single element and an already sorted array, and make sure the loop never swaps past the crossing point.

Follow-up

  • Extend it to an array of 0s, 1s and 2s in one pass (the Dutch national flag partition with low, mid and high pointers).
  • What is the minimum number of swaps needed to group all the 1s together?
  • How does your answer change if the order of records within each group must be preserved?

Solve a medium-level competitive programming problem involving array manipulation.

Medium · Data Structures & Algorithms

Approach

  1. Read the constraints first and turn them into a target: with n around 10^5, O(n^2) is too slow, so aim for O(n) or O(n log n).
  2. Match the problem to a known array pattern: prefix sums for range sums, a hash map of prefix-sum counts for subarrays summing to k (works with negatives), sliding window for contiguous ranges with a monotonic condition, two pointers on sorted input, Kadane's algorithm for maximum subarray sum.
  3. For in-place edits, know the standard moves: rotate by k with three reversals, move zeros with a write pointer, a difference array for many range increments.
  4. State time and extra space for the brute force and the improved version, and say what made the improvement valid (for example, a sliding window needs non-negative values).
  5. Test empty and single-element input, all negative values, duplicates, k larger than n for rotations, and integer overflow on large sums.

Follow-up

  • Why does a sliding window break when the array contains negative numbers, and what replaces it?
  • Can you do it in place with O(1) extra space?
  • How would you handle the input arriving as a stream instead of a fixed array?

How does JavaScript handle asynchronous operations?

Medium · Web Technologies & Frameworks

Approach

  1. JavaScript runs your code on one thread with one call stack; timers, network and file I/O are handled by the host (browser APIs or Node's libuv), which queues a callback when the work finishes.
  2. The event loop takes one task (macrotask) at a time, such as a setTimeout or I/O callback, and after it finishes drains the entire microtask queue (promise reactions, queueMicrotask) before the next task.
  3. Show the ordering with a snippet: console.log('A'); setTimeout(() => console.log('B'), 0); Promise.resolve().then(() => console.log('C')); console.log('D') prints A, D, C, B.
  4. async/await is promise syntax: await pauses only that function, and the rest of it resumes as a microtask, so the caller keeps running. Errors surface as rejections, so use try/catch around await or .catch().
  5. Node specifics: the event loop has phases (timers, poll, check for setImmediate), process.nextTick callbacks run before promise microtasks, and CPU-heavy synchronous work blocks everything, which is where worker_threads come in.

Follow-up

  • Predict the output of a snippet mixing setTimeout, Promise.then, await and process.nextTick.
  • A long synchronous loop freezes the page: how would you fix it?
  • What is the difference between Promise.all, Promise.allSettled, Promise.race and Promise.any?

Walk me through the fundamental concepts of Operating Systems, specifically focusing on threading and memory m

Medium · Core CS & Databases

Walk me through the fundamental concepts of Operating Systems, specifically focusing on threading and memory management.

Approach

  1. Process vs thread: threads in one process share the address space (heap, globals, open files) but each has its own stack, registers and program counter, so thread switches are cheaper than process switches and isolation is weaker.
  2. Shared memory brings race conditions; protect critical sections with a mutex, use semaphores to count resources and condition variables to wait for a state change.
  3. Deadlock needs all four Coffman conditions (mutual exclusion, hold and wait, no preemption, circular wait); the usual prevention is a global lock order or try-lock with timeout.
  4. Memory management: each process sees virtual memory mapped to physical frames through page tables, with the TLB caching translations; a page fault loads the page from disk, and thrashing is when the working set exceeds RAM.
  5. Cover stack vs heap allocation and internal vs external fragmentation (paging removes external fragmentation). Tie it to Node: one JavaScript thread, a libuv thread pool (default size 4) for file system, DNS and crypto work, and worker_threads for CPU-bound code.

Follow-up

  • Walk through what happens on a page fault, step by step.
  • What is the difference between a mutex and a binary semaphore?
  • Node is single-threaded: how can it still have race conditions, and where do threads appear?

Write a SQL query to join two tables and filter the results based on specific conditions.

Medium · Core CS & Databases

Approach

  1. Clarify the tables, keys and cardinality first, then write the shape: SELECT c.name, o.id, o.amount FROM customers c JOIN orders o ON o.customer_id = c.id WHERE o.status = 'PAID' AND o.created_at >= DATE '2026-01-01'.
  2. Choose the join type on purpose: INNER keeps only matches; LEFT keeps every left row. A filter on the right table in WHERE turns a LEFT JOIN into an inner join, so put it in the ON clause when unmatched rows must stay.
  3. Handle NULLs correctly: col = NULL is never true (use IS NULL), and for 'rows with no match' use LEFT JOIN ... WHERE o.id IS NULL or NOT EXISTS; NOT IN returns nothing if the subquery yields a NULL.
  4. Filter row-level conditions in WHERE and aggregate conditions in HAVING; a one-to-many join repeats parent rows, so aggregate the child table first or count DISTINCT.
  5. Performance: index the join key and selective filter columns, and keep filters sargable (created_at >= date, not YEAR(created_at) = 2026).

Follow-up

  • List customers who have never placed an order.
  • Return each customer's highest-value order (a window function such as ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY amount DESC)).
  • Your SUM doubled after adding a second join: why, and how do you fix it?

Explain the database schema and entity relationships of your most recent project.

Medium · Core CS & Databases

Approach

  1. Open with the main entities and their primary keys, then each relationship with its cardinality: one-to-many as a foreign key on the many side, many-to-many as a junction table with a composite key or unique constraint.
  2. Trace one real request through the schema, from the API call to the rows read and written, so the relationships come out of how the app uses the data.
  3. Explain normalization (roughly 3NF) and every deliberate denormalization, such as a cached count or a copied field, with the read pattern that justified it.
  4. Name the constraints (NOT NULL, UNIQUE, foreign keys with ON DELETE behaviour) and the indexes you added for the main queries.
  5. Justify relational vs document storage for this data, and admit one design choice you would change now and why.

Follow-up

  • A new requirement needs full change history on one entity: how would the schema change?
  • How did you run schema migrations without downtime or data loss?
  • Which query was slowest, and what did you do about it?

Explain the concept of Promises in JavaScript. Can you write a custom Promise implementation?

Medium · Web Technologies & Frameworks

Approach

  1. Define it: a Promise represents a future value, has three states (pending, fulfilled, rejected) and settles exactly once; later resolve or reject calls are ignored.
  2. Implementation core: a class holding state, value and a list of pending callbacks; the executor gets resolve and reject functions and runs inside try/catch so a throw becomes a rejection.
  3. then(onFulfilled, onRejected) returns a new promise. Run the handler as a microtask (queueMicrotask) even if the promise has already settled, resolve the new promise with the handler's return value, and reject it if the handler throws. Missing handlers pass through: v => v and e => { throw e }.
  4. Resolution step: if the returned value is a thenable, adopt its state by calling its then; resolving a promise with itself rejects with a TypeError.
  5. Add catch as then(undefined, onRejected) and finally as a handler that runs a callback and then passes the original value or error through.

Follow-up

  • Implement Promise.all on top of your class: keep results in input order, reject on the first failure, and resolve [] for an empty array.
  • Write a promisify helper that turns a Node-style (err, result) callback function into one that returns a promise.
  • How would you limit a list of async tasks to at most k running at once?

Deep dive into React: How does the virtual DOM work, and how do you use Hooks effectively?

Medium · Web Technologies & Frameworks

Approach

  1. The virtual DOM is a tree of plain JavaScript objects describing the UI. A state or props change re-renders the component into a new tree, and reconciliation diffs it against the previous one; the commit phase then applies only the needed DOM changes.
  2. The diff is an O(n) heuristic resting on two assumptions: elements of a different type produce different trees (the subtree is replaced), and keys identify children across renders. Explain why index keys break on reorder or insert.
  3. Hooks rules: call them only at the top level of function components or custom hooks, because React matches hook state by call order.
  4. useState with the updater form (setCount(c => c + 1)) when the next value depends on the previous one; useEffect with a complete dependency array and a cleanup for subscriptions and timers; useRef for mutable values that should not trigger a render.
  5. useMemo and useCallback pay off for expensive computations or for keeping references stable for React.memo children, not by default. Watch for stale closures, and extract repeated logic (such as data fetching) into custom hooks.

Follow-up

  • Why is the array index a poor key when a list can be reordered or filtered?
  • What is the difference between useEffect and useLayoutEffect, and when would you need the second?
  • A context value changes and many components re-render: how would you find and reduce that?

What are RESTful APIs, and what are the best practices for designing them?

Medium · Web Technologies & Frameworks

Approach

  1. REST models resources as nouns in URLs (/policies/{id}/claims) handled with HTTP methods, and each request is stateless: it carries its own authentication, such as a JWT bearer token.
  2. Method semantics: GET is safe and idempotent; PUT replaces and is idempotent; DELETE is idempotent; PATCH is a partial update; POST creates and is not idempotent, so add an Idempotency-Key header to make retries safe.
  3. Use status codes precisely: 201 with a Location header on create, 204 for no body, 400 for bad input, 401 unauthenticated vs 403 forbidden, 404, 409 for conflicts, 429 for rate limits. Return one consistent error body.
  4. Collections need pagination (offset is simple; cursors stay stable when rows are inserted and stay fast deep into the list), plus filtering and sorting through query parameters.
  5. Cover versioning (/v1 or a header), HTTPS, input validation, rate limiting, and caching with ETag / If-None-Match and Cache-Control.

Follow-up

  • PUT or PATCH for updating one field, and what does idempotency mean for each?
  • A client times out on a POST and retries: how do you avoid creating the record twice?
  • How would you implement JWT authentication, and how would you revoke a token before it expires?

Explain the core concepts of Object-Oriented Programming (Polymorphism, Inheritance, Encapsulation, Abstractio

Medium · Core CS & Databases

Explain the core concepts of Object-Oriented Programming (Polymorphism, Inheritance, Encapsulation, Abstraction).

Approach

  1. Encapsulation: keep state private and change it only through methods that enforce invariants, for example an Account whose withdraw() refuses to go below zero (private fields, or # fields in JavaScript).
  2. Abstraction: expose what an object does rather than how, through interfaces or abstract classes such as a PaymentMethod with pay(amount), so callers never depend on the implementation.
  3. Inheritance models an is-a relationship and reuses code; mention its costs (tight coupling, fragile base classes) and why composition is often the safer default.
  4. Polymorphism: runtime polymorphism via overriding and dynamic dispatch (a PaymentMethod reference calling CardPayment.pay) versus compile-time overloading in Java or C++. JavaScript has no overloading, and its classes are syntax over prototypes.
  5. Give each pillar a concrete example from your own project rather than a textbook definition, and separate abstraction (hiding complexity) from encapsulation (protecting state).

Follow-up

  • What is the difference between an abstract class and an interface, and when would you choose each?
  • Give an example where composition beats inheritance.
  • What does the Liskov substitution principle forbid, and what is a classic violation?

You have 25 horses and a track that can race 5 horses at a time. What is the minimum number of races to find t

Medium · Puzzles & Brain Teasers

You have 25 horses and a track that can race 5 horses at a time. What is the minimum number of races to find the top 3 fastest horses?

Approach

  1. State the assumptions: no stopwatch, a race gives only the finishing order of up to 5 horses, and each horse runs at the same speed every time. The standard strategy needs 7 races.
  2. Races 1-5: split the horses into groups A-E and race each group. Race 6: race the five group winners; call the groups A-E in that finishing order, so A1 is the fastest overall.
  3. Eliminate: groups D and E entirely (their winners already have three horses ahead of them), C2 and below, B3 and below, A4 and below.
  4. The candidates for second and third are A2, A3, B1, B2 and C1, exactly five horses, so race 7 decides them: its top two finishers are overall second and third.
  5. Be clear about what this shows: five heats are forced because every horse must race, and this strategy then needs two more. As to why a sixth race cannot settle it, one race cannot both pick the overall winner and rank second and third among horses that have never met. Present it as the reasoning behind 7, not as a formal lower-bound proof.

Follow-up

  • How many races are needed if you only want the single fastest horse?
  • How does the reasoning change if you need the top 5 instead of the top 3?
  • Generalise: 64 horses, 8 lanes, find the top 4: how do you set up the elimination?

Estimate the number of people traveling from Gurugram to Uttarakhand on a holiday weekend. Walk me through you

Medium · Puzzles & Brain Teasers

Estimate the number of people traveling from Gurugram to Uttarakhand on a holiday weekend. Walk me through your logic.

Approach

  1. Pin the scope before any numbers: one direction or both, residents only or people passing through, all transport modes, and what 'holiday weekend' means (a long weekend).
  2. Demand side: start from a population figure you state as an assumption, convert to households, keep the share with the income and habit to travel on a long weekend, then the share choosing Uttarakhand over other nearby hill destinations; multiply by people per household trip.
  3. Supply side as a cross-check: estimate cars on the main route (vehicles per hour times hours, times occupancy) plus buses and trains (services times seats times load factor), and compare with the first estimate.
  4. Round at every step, give a range rather than a single point, and name the assumption that moves the answer most (usually the share who travel at all).
  5. Close with how to validate it from real data: toll plaza counts, bus and train bookings, or hotel occupancy in the main destinations.

Follow-up

  • Which single assumption is your estimate most sensitive to, and how would you tighten it?
  • How would the number change for an ordinary weekend?
  • If you had toll data, how would you separate Gurugram travellers from everyone else on that road?

One log partition stops advancing while the others drain

Easy · poison message · head-of-line blocking · consumer lag

Search results for a subset of tenants are hours stale; the rest are current. The projection consumer reports lag of zero on 15 of 16 partitions and 400,000 on one. Its error rate is flat and its CPU is idle. outbox_event has no pending rows older than a second, so the relay has published everything it holds. Identify the mechanism, give the ordered checks, and state what you do in the first ten minutes versus what you change permanently.

Approach

  1. Read the lag distribution first. A slow consumer lags everywhere; zero on fifteen partitions and 400,000 on one is not throughput. Idle CPU on the stuck partition means the consumer is not advancing its offset at all, which points at one message it cannot get past rather than at a rate problem.
  2. Exonerate the producer before touching the consumer. No pending outbox rows older than a second means the relay published, so the event exists in the log. This separates never sent from sent and never applied, which are different code paths and usually different owners.
  3. Read the message at the stuck offset and the handler's log lines for its event_id. A flat error rate with no progress has two explanations and you must distinguish them: the handler is throwing and the retry loop is swallowing it, or the handler is blocking on something and never returning. Idle CPU with no error lines favours the second.
  4. Mitigate before diagnosing further. Move the offending event to a dead-letter store and commit the offset past it. Adding consumers does nothing here, because a partition is consumed by exactly one member of the group, and the blast radius is every aggregate hashed to that partition, not only the aggregate that produced the bad event.

Follow-up

  • The dead-lettered event carried aggregate_version 7 and the projection had applied 6. What must the replay do differently if 8 and 9 landed in the meantime?
  • How do you show staleness to the user while the partition is behind, given the API already returns the projection's watermark?

Suggested practice checklist

The plan follows the reported loop: fundamentals first (algorithms, JavaScript, React, REST), then core CS and SQL, then the puzzles, and finally spoken behavioral and project answers. Each day ends with something you can check.

Day 1 — Resume audit and project walkthrough

  • Write the four reported stages on one page, then list every technology on your resume with one sentence on how you used it.
  • Draw the schema and entity relationships of your latest project, and trace one request from database to backend to UI.
  • Write down one design decision, one failure and one redesign for that project.

Deliverable: A one-page loop map, a technology-by-technology resume audit, and a schema and data-flow diagram you can explain aloud.

Day 2 — Stack, linked list and arrays

  • Code balanced parentheses with a stack for three bracket types, handling empty and leftover cases.
  • Detect a cycle in a singly linked list with slow and fast pointers, and explain why the pointers must meet.
  • Sort a 0/1 array with a count and with two pointers, and state the complexity of each.
  • Solve two array-manipulation problems of medium level, writing the brute force and the improved version.

Deliverable: Five working solutions (parentheses, cycle, 0/1 array and two array problems) with stated time and space complexity and a list of edge cases for each.

Day 3 — JavaScript asynchrony and Promises

  • Predict the output order of snippets mixing synchronous code, setTimeout, Promises and async/await, then run them to check.
  • Write a minimal Promise class with pending, fulfilled and rejected states, chaining and error propagation.
  • Add Promise.all and a rejection test. Then explain how a callback queued with setTimeout or then keeps its surrounding variables through a closure, and show the classic var-in-a-loop setTimeout bug and how let fixes it.

Deliverable: A tested custom Promise file and a one-page explanation of the event loop, microtasks, callbacks and closures, including the var versus let loop example.

Day 4 — React, REST and Node.js

  • Explain the virtual DOM and reconciliation, then build a small component using useState, useEffect with cleanup, and useMemo or useCallback where justified.
  • Design a REST API for one resource you know: URLs, verbs, status codes, pagination, validation and error format.
  • Sketch a JWT login flow in Node.js (issue, verify, expiry, refresh) and list the common mistakes. Then write an Express middleware chain (logging, authentication, route handler, error handler), explain why order matters, and show how errors reach the error handler.
  • Outline a small claims-submission service: REST endpoints, a relational schema, JWT authentication, and a Socket.io event that pushes a claim's status change to the client.

Deliverable: A working component, a written REST design for one resource, a JWT flow diagram, an Express middleware sketch, and a one-page design of the claims-submission service with its real-time status feed.

Day 5 — OOP, SQL and operating systems

  • Explain polymorphism, inheritance, encapsulation and abstraction, each with a short code example from your own language.
  • Write join-and-filter queries against two tables, including an inner join, a left join that finds unmatched rows, and a filter with aggregation.
  • Explain process versus thread, context switching, race conditions, deadlock, and paging versus virtual memory in your own words.

Deliverable: A one-page OOP cheat sheet with examples, five tested SQL queries, and a short written answer on threading and memory.

Day 6 — Puzzles and estimation

  • Work the 25-horses problem on paper until you can justify every race and the total of 7, then explain it to someone else.
  • Estimate the Gurugram to Uttarakhand holiday traffic out loud, listing assumptions and cross-checking with a second route to the same answer.
  • Do one more estimation of your own choice and note where assumptions were weakest.

Deliverable: A written horses solution with justification, and two spoken estimations with their assumptions listed.

Day 7 — Behavioral answers and full mock

  • Write and rehearse answers to the weaknesses, five-year, relocation and roadblock prompts, with real details in each.
  • Run a mock: one coding problem, one async or React question, one SQL query and your project walkthrough, all spoken aloud.
  • List the three weakest answers from the mock and fix them.

Deliverable: Four written behavioral answers and a mock-session log with the three weakest points and their fixes.

Behavioural preparation

The final HR stage is described as covering cultural fit and career aspirations, and the requirements candidates describe mention communicating technical ideas to non-technical people, confidence and self-awareness. Your answers should be specific, honest and consistent with your resume. For this role that means a real technical story, a concrete direction and a clear position on logistics.

  1. Describe your most complex project in detail. What specific problem did it solve?
  2. Walk me through how you implemented JWT authentication in your recent project.

Tell me about two technical or professional areas where you lack proficiency, and explain how you are working

Medium · Behavioral & HR

Tell me about two technical or professional areas where you lack proficiency, and explain how you are working to improve them.

Approach

  1. Choose two gaps that are real, one technical and one professional, and avoid naming a core must-have such as basic JavaScript. Honest examples are production AWS experience or large-scale system design (listed as extras for the role), and estimating or pushing back on scope.
  2. For each gap, give a specific moment where it showed up so it is credible, then the actions you have taken: a side project you built, a topic you are working through with a concrete output, feedback you requested in code review.
  3. State progress so far (what you shipped or can now do) and what the next step is, so the answer ends on direction instead of apology.
  4. Avoid disguised strengths such as working too hard, and avoid a list of intentions with no action already started. Be ready for follow-ups on anything technical you name, with what you have actually done.

Follow-up

  • What have you built or shipped so far while working on that first gap?
  • How will you know the gap has closed?
  • Which of these two would matter most in your first months on a web and API team?

Where do you see yourself in 5 years within the tech industry?

Medium · Behavioral & HR

Approach

  1. Answer in terms of capability, not just titles: for example moving from implementing features to owning a service end to end, growing in system design (a listed extra for this role), and mentoring newer engineers (mentoring and code review are listed duties).
  2. Tie the path to this role's stack and work: strengthening full-stack JavaScript, Node.js and React depth, and learning cloud deployment, with a couple of milestones along the way.
  3. Give the first step toward it within this job, such as learning the codebase and release process and then taking ownership of a feature area. Short, concrete milestones sound credible; a long plan sounds rehearsed.
  4. Keep the answer inside the tech industry, as asked, and avoid either generic phrases about growing with the company or a goal that suggests leaving the role soon.

Follow-up

  • What would you do in your first year here to move toward that?
  • What if the path leads toward leading a team instead of writing code?
  • What would you do if the team worked on a stack you had not planned to learn?

Are you willing to relocate if the role requires it?

Medium · Behavioral & HR

Approach

  1. Treat it as a logistics question: give a plain yes, no or conditional answer in the first sentence, then the reason. A hedged answer leaves the listener unsure where you stand.
  2. If you are open to it, say how flexible you are on location and timing. If there are conditions, name the real ones (family, notice period, visa) instead of leaving them vague.
  3. After answering, you can ask what locations and what duration are involved, so your answer is informed rather than a blind commitment.
  4. Make sure the answer matches your resume, your stated notice period and your intentions. Do not say yes if you would decline an offer, because the question can come back when terms are discussed.

Follow-up

  • Is there any location you would not consider, and why?
  • How soon could you start after an offer, and what would affect that?
  • Tell me about a time you adapted quickly to a new team, tool or place.

Walk me through a time when your project faced a major technical roadblock. How did you handle it?

Medium · Behavioral & HR

Approach

  1. Choose a roadblock that was technical and where you owned the diagnosis, such as an async bug, a slow query or endpoint, a failing integration or a blocked dependency. Prefer one from your stack (JavaScript, React, Node.js, SQL).
  2. Open with two sentences of context and what made it a roadblock (users affected, deadline, data at risk), then spend most of the answer on the sequence you followed: reproduce, narrow down, form hypotheses, test them, and decide.
  3. Name the options you considered and why you rejected them, then the fix and the evidence it worked, such as a test, a measurement or a monitor added afterwards.
  4. Use 'I' for your own decisions and mention the QA, product or other people you worked with. Avoid a story where someone else solved it, or one with no technical detail.

Follow-up

  • Which alternatives did you reject, and why?
  • What did you change afterwards so it would not happen again?
  • How did you explain the delay or risk to someone non-technical?