Skip to content
Tech Interview Prep

Real Interview Questions for the Software Engineer at Globant

New

Interview Q&A

17 questions · Flow follows Relevance until this set has a learning order.

Q&A-1Walk me through how you would reverse an array in place.

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

I'd use two indices, one at each end, swap the elements they point at, and move them toward the middle until they meet. That's O(n) time and O(1) extra space, and it mutates the caller's array, which is what "in place" means. Before writing it I'd confirm two things: the language and whether the array is mutable, and whether the function should return the array or nothing.

Python
# Python 3.12
def reverse_in_place(a: list) -> list:
    lo, hi = 0, len(a) - 1
    while lo < hi:
        a[lo], a[hi] = a[hi], a[lo]
        lo += 1
        hi -= 1
    return a

Trace. Input [1, 2, 3, 4, 5], so len - 1 = 4:

steplohiarray after swap
104[5, 2, 3, 4, 1]
213[5, 4, 3, 2, 1]
322loop stops, lo < hi is false

For n elements that is floor(n/2) swaps. The middle element of an odd-length array never moves, and it doesn't need to.

Edge cases I'd check out loud. An empty array and a single element both fall straight through the loop and return unchanged. None is not an empty array: I'd either reject it with a TypeError or document that the caller must not pass it, rather than letting len(None) raise somewhere confusing.

Alternatives and when not to use them. a.reverse() in Python does the same job in place and returns None, which is what I'd ship in production. The point of writing the loop is to show the index logic. a[::-1] is idiomatic but allocates a new list of n references, so it violates the in-place requirement and doubles memory for large inputs. In JavaScript, Array.prototype.reverse() also mutates and returns the same reference, which surprises people who expect a copy; toReversed() (ES2023) returns a new array instead. In Java, Collections.reverse(list) works on any List, and a primitive int[] needs the same two-pointer loop.

Failure modes to name. If the array is shared, a reversed view changes what other threads or callers read mid-operation, so the in-place version needs external synchronisation or a copy at the boundary. If the function returns the same reference and the caller assumed a copy, the bug shows up far from the call site. Detection: a unit test that keeps a reference to the original object and asserts on it after the call, plus a property test that compares against list(reversed(x)) on random lengths including 0 and 1.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-2Explain the JavaScript closures, hoisting, and event-loop concepts such as setImmediate versus process.nextTick.

Reported in Globant Software Engineer Interview Guide (2026): Process ...

The 2-minute answer

I'll take them in dependency order: hoisting decides what names exist when code runs, closures decide what those names keep alive, and the event loop decides when callbacks fire. I'm assuming Node.js 20 or later with CommonJS, since setImmediate and process.nextTick are Node APIs and not part of the browser event loop.

Hoisting. Declarations are registered before any code in their scope runs. var is hoisted and initialised to undefined. Function declarations are hoisted with their body. let and const are hoisted too, but they sit in the temporal dead zone until their line executes, so reading them early throws.

JavaScript
console.log(a); // undefined
var a = 1;
console.log(b); // ReferenceError: Cannot access 'b' before initialization
let b = 2;

Closures. A function keeps a live reference to the variables of the scope it was created in, not a copy of their values. That is why the classic var loop misbehaves: all three callbacks share one i, which is 3 by the time they run. A let in a for header creates a fresh binding per iteration.

JavaScript
for (var i = 0; i < 3; i++) setTimeout(() => console.log('var', i));
for (let j = 0; j < 3; j++) setTimeout(() => console.log('let', j));
// var 3, var 3, var 3, let 0, let 1, let 2

The cost of closures is retention. A callback that captures a large buffer keeps the buffer alive for as long as the callback is reachable, so a leaked listener is a memory leak even when the code looks correct.

The event loop and the ordering of callbacks. Node runs the current script to completion, then drains the process.nextTick queue, then drains the promise microtask queue, and only then moves to the timers, poll and check phases. setImmediate callbacks run in the check phase, after I/O.

JavaScript
setImmediate(() => console.log('immediate'));
process.nextTick(() => console.log('tick'));
Promise.resolve().then(() => console.log('promise'));
console.log('sync');
// sync, tick, promise, immediate
MechanismRunsTypical use
process.nextTickafter the current operation, before promisespropagate an error or emit an event before I/O
Promise microtaskafter nextTick queue, before any macrotaskasync/await continuations
setImmediatecheck phase of the next loop iterationyield to I/O after a CPU chunk
setTimeout(fn, 0)timers phase, minimum 1 msrarely the right tool

Two details interviewers probe. From the main module, setTimeout(fn, 0) versus setImmediate order is not deterministic, because it depends on whether a millisecond has elapsed when the loop starts. Inside an I/O callback, setImmediate always runs before any timer. Also, recursive process.nextTick starves I/O, because the nextTick queue is drained completely before the loop moves on. Recursive setImmediate yields each iteration, so it is the safer way to break up long work.

What I'd say about failure modes. Stale closures in React-style code and in long-lived callbacks show up as a value that never updates. A nextTick loop shows up as a process that never answers health checks. I'd catch the second with event loop lag monitoring, for example perf_hooks.monitorEventLoopDelay, and look at p99 lag rather than the average.

If they push on the details, I'd say I know the rules, but I'd verify exact ordering claims against the Node.js event loop documentation before relying on them in production.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3How does the Event Loop work in Node.js, and why is it important for performance?

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

Node runs your JavaScript on a single thread. The event loop, provided by libuv, decides which callback runs next. Each iteration walks through phases: timers (setTimeout and setInterval callbacks whose delay has passed), pending callbacks, poll (collect new I/O events and run their callbacks; this is where the loop blocks when nothing else is due), check (setImmediate callbacks), and close callbacks. Between every callback Node drains the microtask queues: process.nextTick first, then resolved promise continuations.

Why it matters for performance: every request shares that one thread, so Node parallelises waiting, not your JavaScript. A database query or file read is handed to the OS or to the libuv thread pool (4 threads by default, set by UV_THREADPOOL_SIZE, maximum 1024), and the loop keeps serving other requests until the completion arrives. Throughput is set by how little time each callback holds the thread. A synchronous 50 ms task stalls every in-flight request for 50 ms.

Trace (hypothetical figures). Request A calls JSON.parse on a 12 MB payload, which takes 180 ms on the loop. Request B arrives at 10 ms and its database reply is ready at 40 ms. The reply waits in the poll queue until A's callback returns at 190 ms, so B's latency includes 150 ms spent waiting for a thread busy with unrelated work.

JavaScript
const http = require('node:http');
http.createServer(async (req, res) => {
  const rows = await db.query('select payload from docs where id = $1', [req.params.id]); // loop free while waiting
  const doc = JSON.parse(rows[0].payload); // 180 ms here blocks every other request
  res.end(JSON.stringify(doc));
}).listen(3000);

Failure modes and detection. Event loop lag is the signal: sample it with perf_hooks.monitorEventLoopDelay() or a metric such as prom-client's eventLoopLag, and treat a p99 above roughly 100 ms under load as blocking work. A common trap is a recursive process.nextTick or a promise chain that never awaits real I/O. The microtask queue drains completely before the loop advances, so the chain starves timers and I/O entirely.

When not to fight the loop: move heavy CPU work to worker_threads or a separate service, stream large bodies instead of parsing them whole, and batch small I/O calls. Node suits I/O-bound fan-out well and long CPU work on the request path poorly.

I would answer in that order: the phases, then the thread-pool offload, then the blocking consequence with a measured number.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-4Explain the difference between interface and abstract class in Java/C#.

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

An interface declares a contract: a set of methods a type promises to support, with no instance state and no constructors. An abstract class is a partial implementation: it can hold fields, constructors, concrete methods and protected helpers, and it can be extended by one class only. I reach for an interface when unrelated types need to share a capability, and an abstract class when subclasses share state or a template algorithm.

Two things decide whether that holds up in a real codebase: how many supertypes a class needs, and how the shared code will evolve.

AspectInterface (Java 8+ / C# 8+)Abstract class
Instance fieldsnone (only static final / static readonly constants)yes, any access level
Constructorsnoneyes, run by subclass super(...) / : base(...)
Multiple inheritancea type can implement manysingle base class only
Concrete methodsdefault (Java) / default interface methods (C#)yes
Access modifiers on memberspublic by default, private helpers allowed since Java 9 / C# 8any
Typical rolecapability, port, seam for test doublesshared base with state or template method

Where it bites in production. Say a PaymentGateway abstract class carries a retryCount field and a constructor that opens a client. Every new gateway must extend it, so a CardGateway that already extends BaseHttpClient cannot also be a Refundable. Moving the capability into an interface fixes that, but then the shared retry logic has to live somewhere else, usually a composed helper or a default method. Default methods cannot touch state, so the helper cannot cache a connection; that is the constraint to name out loud.

A trace makes the trade-off concrete:

Java
interface Refundable { void refund(String txId, long cents); }
abstract class BaseGateway {
    protected final HttpClient http;
    BaseGateway(HttpClient http) { this.http = http; }
    protected Response send(Request r) { /* retries, metrics */ return http.send(r); }
}
class CardGateway extends BaseGateway implements Refundable {
    CardGateway(HttpClient h) { super(h); }
    public void refund(String txId, long cents) { send(buildRefund(txId, cents)); }
}

CardGateway gets shared state from the base and the capability from the interface. Adding a second base class would fail to compile, which is the point of the constraint.

Failure modes I watch for.

  • Interfaces grow: adding an abstract method to a published interface breaks every implementer. Default methods soften this, but a default that is wrong for one implementer still ships silently. Detect it in review by grepping implementers when the interface changes.
  • Abstract classes become god bases: every subclass inherits fields it does not need and the constructor signature becomes a coupling point. Symptom: subclasses override most methods or call super with nulls.
  • Diamond default conflicts: in Java, two interfaces with the same default method force the class to override it; in C# the same clash requires an explicit override. Compilation catches it, but it signals two unrelated capabilities are being merged.
  • Mocking: interfaces are trivial to fake in tests. Abstract classes with constructor logic need a real or partial subclass, which slows tests and hides the seam.

When not to use either. If the shared piece is pure behaviour with no state, a static helper or a composed collaborator is simpler and easier to test than a base class. I would not add an abstract class just to avoid repeating three lines.

In an interview I would close with the rule I actually apply: interface for what a type can do, abstract class only when subclasses genuinely share state and construction.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-5Explain the difference between a class and an object instance, and how you would use each in a real codebase.

Reported in Globant Software Engineer Interview Questions

The 90-second answer

A class is a definition: it declares the state shape and the behaviour that every instance of that type will have. An object is a concrete value created from that definition, with its own copy of the state. The class exists once in the program; instances exist as many times as you construct them. I'd use the class as the unit of design (what invariants does this type protect, what can callers do with it) and instances as the unit of runtime work (each order, connection or cart is one instance with its own data).

Two things separate a clear answer from a muddled one: where the state lives, and what the constructor is responsible for.

Worked example (Python, 3.12)

Python
class Money:
    def __init__(self, cents: int, currency: str):
        if cents < 0:
            raise ValueError("negative amount")
        self.cents = cents
        self.currency = currency

    def add(self, other: "Money") -> "Money":
        if other.currency != self.currency:
            raise ValueError("currency mismatch")
        return Money(self.cents + other.cents, self.currency)

a = Money(1250, "EUR")   # instance 1, own state
b = Money(399, "EUR")    # instance 2, own state
c = a.add(b)             # new instance; a and b unchanged
print(a is b, c.cents)   # False 1649

Money is the class: one definition, enforcing that amounts are non-negative and currencies match. a, b and c are instances. Each has its own cents and currency attributes, and add returns a fresh object rather than mutating either input. That immutability-by-convention is a design choice worth naming, because shared mutable instances are where bugs appear once several services hold references to the same object.

Trade-offs and when not to use a class

NeedReach forWhy
Many values with the same invariantsclassthe constructor enforces them once
Behaviour with no per-instance statemodule functionsa class adds a type with nothing to hold
Data crossing a service boundaryplain data (dataclass, record, schema)serialisation and versioning are simpler without behaviour attached

Inheritance is the usual over-reach. A subclass is a second definition that inherits every instance's shape, so changing the base class changes every instance in every subclass. Prefer composition unless the subtype really is substitutable everywhere the base is used.

Failure modes I'd watch for

  • Shared mutable state on a class attribute. class Cart: items = [] gives every instance the same list. Detection: a test that creates two carts and asserts they are independent fails immediately.
  • Constructors doing I/O. A Money or Order that opens a database connection in __init__ makes construction slow and untestable. Detection: unit tests that need a running database to create a value.
  • Instances leaking identity. Comparing with is where value equality was meant, or using mutable instances as dictionary keys. Detection: lookups that intermittently miss.

So the distinction is simple to state, but the interview signal is in whether the candidate can say what the class promises, what each instance owns, and where the design would break if an instance were shared or mutated.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-6What are the advantages of using Dependency Injection in a modern application?

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

Dependency Injection means a class receives its collaborators from outside instead of constructing them itself. The payoff is that the wiring lives in one place, so I can swap implementations, test units in isolation, and see the real dependency graph at startup. I'd frame the advantages around three concrete things: testability, replaceability at the boundary, and controlled lifetimes.

Take an order service that needs a payment gateway and a clock. Without injection, new StripeGateway(apiKey) sits inside OrderService. A unit test then either hits the network or needs monkey-patching. With constructor injection, the test passes a fake gateway and a fixed clock, and the test runs in microseconds with no network.

TypeScript
class OrderService {
  constructor(
    private readonly payments: PaymentGateway,
    private readonly clock: Clock,
  ) {}

  async place(order: NewOrder): Promise<Receipt> {
    const now = this.clock.now();
    return this.payments.charge(order.total, { idempotencyKey: order.id, at: now });
  }
}

// test
const svc = new OrderService(new FakePayments(), new FixedClock('2026-01-10T09:00Z'));
Without DIWith DI
Tests need network or global patchesTests pass fakes, run in ~1 ms
Config read inside business codeConfig read once at composition root
Swapping SDK touches every call siteSwap happens in one module
Lifetimes implicit (new per call)Lifetimes declared: singleton, scoped, transient

Lifetimes matter more than candidates expect. A DI container that makes a database connection per request is fine. One that makes it a singleton shared across requests with a per-request transaction stored on it is a concurrency bug. Naming the lifetime for each registration is what keeps a shared client from leaking request state.

Where I would not push it. Injecting every value, including pure functions and plain data, adds ceremony without benefit. Inject things with behaviour or side effects: clients, repositories, clocks, feature flags. Also, a container that resolves lazily hides missing bindings until a specific request path runs. Validate the graph at startup, which most containers can do in a test.

Failure modes I'd watch for. Captive dependencies: a singleton that captures a scoped service gets stuck with a stale instance. Detection is a startup check, or an integration test that resolves every root. Service-locator drift: code that calls container.resolve() inside business logic reintroduces hidden dependencies, visible only as surprising test setup.

So the advantages are: units are testable without infrastructure, boundaries are swappable in one place, and the object graph and its lifetimes are explicit and checkable at startup.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-7Describe SOLID principles when designing a system.

Reported in SOLID and System Design

The 90-second answer

I'd treat SOLID as a checklist for where change will hurt, not a set of rules to apply to every class. Each principle names one way a design breaks under change: a class with two reasons to change (SRP), a new feature that forces edits to working code (OCP), a subtype that breaks its callers (LSP), an interface that forces implementers to carry methods they don't use (ISP), and a high-level policy welded to a low-level detail (DIP).

Take a checkout service for a retail client that charges through Stripe today, will add a second processor next quarter, and sends receipts by email and SMS.

TypeScript
interface PaymentGateway {
  charge(orderId: string, amountCents: number): Promise<ChargeResult>;
}

interface Notifier {
  send(customerId: string, message: string): Promise<void>;
}

class CheckoutService {
  constructor(
    private readonly payments: PaymentGateway,
    private readonly notifier: Notifier,
    private readonly orders: OrderRepository,
  ) {}

  async placeOrder(cmd: PlaceOrder): Promise<Order> {
    const order = Order.fromCart(cmd);
    const result = await this.payments.charge(order.id, order.totalCents);
    if (!result.ok) throw new PaymentDeclined(result.reason);
    order.markPaid(result.chargeId);
    await this.orders.save(order);
    await this.notifier.send(order.customerId, receiptText(order));
    return order;
  }
}

Checked against TypeScript 5.x. The shapes matter more than the syntax.

Mapping the principles

  • SRP. CheckoutService orchestrates. Pricing, persistence and notification each have their own reason to change. Order owns its invariants, so markPaid rejects a second charge rather than the service checking for one.
  • OCP. A second processor is a new class implementing PaymentGateway. placeOrder doesn't change. A fraud check is a decorator that wraps the gateway.
  • LSP. Every gateway must report a decline as ok: false with a reason. If one adapter throws on decline and another returns, callers break in ways the type system can't see. I'd run one shared contract test suite against every implementation.
  • ISP. The notifier has no refund method. If refunds need an interface, it's a separate RefundGateway that the refund flow depends on, not a method the notifier must stub.
  • DIP. CheckoutService depends on the two interfaces. The Stripe adapter is constructed once, at the composition root.

Where I stop

A function with one caller and no second implementation doesn't need an interface. Every abstraction costs indirection and a test double to maintain. I add one when a second implementation exists or is scheduled, which is exactly where OCP pressure shows up. The opposite failure is a factory-of-strategy-providers that nobody extends.

Also, don't design the port from one vendor. A PaymentGateway shaped around Stripe's objects leaks Stripe into the domain. Define the port in your own terms (a chargeId and reason codes you own) and let the adapter translate.

Failure modes and how I'd detect them

  • Unrelated changes keep landing in CheckoutService. git log on that file shows pricing and email commits interleaved. That's SRP failing.
  • A new gateway passes its own unit tests and fails the shared contract suite in integration. That's an LSP violation.
  • Methods that throw NotImplementedError in implementers. A grep finds them. That's ISP.
  • The real hazard in this flow is ordering. If orders.save fails after a successful charge, the customer is charged for an order that doesn't exist. Principles won't fix that. I'd persist the order as pending with an idempotency key on the charge, or write an outbox record in the same transaction, so a retry can finish the job without a second charge.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-8Can you explain the difference between monolithic and microservices architecture?

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

A monolith is one deployable unit: one process, one codebase, usually one database schema, released together. Microservices split the same system into separately deployable services, each owning its data and talking over the network. The real difference is where the boundaries sit and what crosses them. A function call inside a monolith cannot time out. An HTTP call between services can, and that changes almost every design decision after it.

Before choosing, I'd ask two things: how many teams will change this system, and do its parts have genuinely different scaling or release needs? If one team ships everything weekly, a modular monolith is usually faster to build and cheaper to run.

Trace of one request. Checkout calls pricing, inventory and payments. In a monolith, placing an order is one database transaction across three modules, and it commits or rolls back as a unit. Split into services, the same action becomes three network calls, and no single transaction spans them. If payments succeeds and inventory then times out, you hold a half-applied order and need a compensating step, usually a saga with persisted state, to undo the charge.

Arithmetic (hypothetical figures). Suppose each of three synchronous dependencies is 99.9% available. A request that needs all three succeeds with probability 0.999^3, about 99.7%, which allows roughly 26 hours of failed requests a year against 8.8 hours for one dependency. Latency compounds the same way: five sequential calls at 20 ms p50 each put 100 ms on the floor before any real work happens.

ConcernMonolithMicroservices
Deployone artefact, one pipelineper-service pipelines, version skew to manage
Dataone transaction boundaryper-service stores, eventual consistency across them
Failurewhole process fails togetherpartial failure, needs timeouts, retries, breakers
Scalingscale the whole binaryscale hot services independently
Debuggingstack tracesdistributed tracing with propagated trace IDs

Failure modes to name. A shared database quietly re-couples services that look separate on the diagram. Synchronous call chains turn one slow dependency into a retry storm. Missing idempotency keys let retries double-charge. Detection: per-dependency latency and error metrics, traces that show fan-out depth, saga tables that expose stuck states, and alerts on retry rate, not just errors.

When not to split. Early product, unclear domain boundaries, or a small team. If you do split, cut along seams that already have their own data and their own owner, extracting one at a time behind a facade, rather than slicing by technical layer.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-9Walk me through how you would design a cloud-based microservices system using Azure services, including how you would handle database execution plans, DI lifetimes, and HTTP header usage.

Reported in Design a Cloud Microservices System

The 90-second answer

First I'd ask what each service owns and what latency and consistency it needs. Assume an order domain with orders, inventory and payments, each owning its own store. Traffic enters through Azure Front Door, then Azure API Management handles auth, rate limits and routing. Services run on Azure Container Apps, or AKS if we need custom networking. Synchronous reads go over HTTP. Commands and events go through Azure Service Bus, so a slow consumer doesn't push latency back onto the caller.

Orders get Azure SQL, because the queries are relational and the team can read a plan. Three things decide whether this survives production: plans stay stable, DI lifetimes don't leak state between requests, and headers carry the contract for retries, concurrency and tracing.

ConcernChoiceFailure it prevents
Query plansQuery Store, forced plans for known regressionsp95 spike after a stats update
DI lifetimeScoped DbContext, typed HttpClient via IHttpClientFactoryCaptive dependency, socket exhaustion
WritesIdempotency-Key on POST, If-Match on PATCHDuplicate orders on retry, lost updates
TracingW3C traceparent through APIM and Service Bus propertiesUn-correlated logs across hops

Execution plans. Query Store is on by default in Azure SQL Database, so I'd look there before touching code. The usual failure is parameter sniffing. A query for status = 'open' compiles against a rare status, the plan does a seek and key lookups, and it is reused for the common status. A hypothetical trace: p95 goes from 12 ms to 900 ms on the same query after a deploy, and the cached plan has a row estimate of 3 against 400,000 actual rows. The fix depends on scope. For one statement, OPTION (RECOMPILE) or OPTIMIZE FOR works. For a regression already captured, sp_query_store_force_plan pins the known good plan. I'd alert on Query Store regressed duration and on dependency duration in Application Insights, so the regression shows up before a customer reports it.

DI lifetimes.

CSHARP
builder.Services.AddDbContext<OrdersDb>(o => o.UseSqlServer(cs)); // scoped
builder.Services.AddHttpClient<InventoryClient>(c => c.BaseAddress = inventoryUri);
builder.Services.AddSingleton<IPricingCache, PricingCache>();

A singleton that takes a scoped OrdersDb is a captive dependency. ASP.NET Core validates scopes in Development and throws at startup. In Production that check is off, so one DbContext lives forever, serves stale tracked entities and throws concurrency errors under load. Creating a new HttpClient per call exhausts sockets, so use IHttpClientFactory. I'd run the startup scope validation in CI with the Production environment set, not rely on Development catching it.

HTTP headers. Idempotency-Key on POST /orders lets a client retry after a timeout. The server stores key to order id for 24 h and replays the response. GET returns an ETag, and PATCH requires If-Match, so a stale write returns 412 instead of overwriting. Only retry idempotent operations, with capped exponential backoff and jitter, through the resilience handler rather than hand-rolled loops. Propagate traceparent on every hop, including Service Bus application properties, so one order can be followed across services.

Trace. The client sends POST /orders with Idempotency-Key: 7f3c. The order service inserts the key and order 42, then calls inventory with a 2 s timeout. Inventory is slow, the call times out, and the client retries 800 ms later. The key is found, so the service returns the stored 201 without creating a second order or reserving stock again.

Failure modes I'd name. A poisoned Service Bus message that retries forever, handled by a dead-letter limit and a runbook. A plan regression after a statistics update, caught by Query Store alerts. A captive dependency that passes tests because they run in Development. Each has a detection signal, and I'd name that signal before the design review.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10Describe a challenging bug you encountered in a production environment and your process for debugging it.

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

The worst one I've owned was a double refund. A Node.js 20 service (TypeScript, PostgreSQL 15) called a payment provider's refund API. After a deploy, about 0.3% of refunds were paid twice. Nothing paged us. Finance caught it in the daily reconciliation, where provider totals were off by exactly one refund amount on 41 orders. I debugged it by narrowing the scope first, then reproducing the failure, then fixing the write path rather than the symptom.

Scoping before touching code

I pulled the 41 affected orders and checked three things: the deploy window (all within 6 hours of the release), whether they shared a region or merchant (they didn't), and whether the duplicate refunds had two provider request ids or one. Two. So the provider had received two distinct requests, which pointed at the client, not at the provider or our database.

I then joined our logs on refund_id. Each refund had one internal id but two outbound attempts, with timeouts on the first one (our client timeout is 2 s). The provider had completed attempt 1 after we gave up on it, so a retry was a second real refund.

Root cause

The retry loop generated its idempotency key inside the loop:

TypeScript
async function refund(orderId: string, amount: number) {
  for (let attempt = 1; attempt <= 3; attempt++) {
    const key = randomUUID(); // new key per attempt: the bug
    try {
      return await provider.refund({ orderId, amount }, { idempotencyKey: key });
    } catch (e) {
      if (!isTimeout(e)) throw e;
    }
  }
  throw new Error('refund retries exhausted');
}

A key only deduplicates if it is the same across attempts. Here every attempt looked new to the provider, so the idempotency mechanism was present but did nothing. The deploy had moved this call from a queue consumer, where the key came from the message, into a synchronous path.

AttemptKeyOutcome on our sideProvider result
1Atimeout at 2 srefund completed at about 2.4 s
2Bsuccesssecond refund completed

The fix and its verification

The key now derives from the refund record, created once outside the loop: refund:${refundId}. Retries reuse it, so the provider replays the first result. I added a test with a stubbed provider that times out after completing the request, asserting a single provider-side charge. I also added an alert on duplicate refund_id values across distinct provider request ids, because the reconciliation check was the only detector and it ran once a day.

For the backfill, I wrote a dry-run script that listed the 41 duplicates, had finance approve it, then issued reversals one at a time with the reversal id stored against the original refund. Before relying on the provider's dedup window, I checked its documented key retention period, since a retry after that window would not be deduplicated.

What I'd say about the process

The useful habit was joining on the business id (refund_id) instead of the request id, which hid the duplication until the join. Ask me about the reconciliation design if you want the detail on how we now catch this within an hour.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11How do you explain a complex technical issue to a non-technical client?

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

First I work out what the client has to decide, because that sets how much detail they need. A client approving a budget or a go-live date needs the impact, the options with their cost and risk, and my recommendation. They do not need the root cause in full on the first call. I state the problem in one sentence in their terms, then the consequence: "Card payments fail for about 4% of checkouts during the evening peak, roughly 300 orders a day." Then the options, each with a time and risk figure, then what I recommend. I also say what I don't know yet and when I will know it.

I assume the client understands their business and nothing of our stack. Every term gets translated into what it does to them. "Connection pool exhaustion" becomes "the service has run out of reusable database connections, so new requests queue and time out."

Technical statementWhat I tell the client
p99 latency 40 ms to 2.1 s after the 14:00 deploy (hypothetical figures)About one in a hundred page loads now takes two seconds, up from under half a second.
Pool saturates at 20 connectionsThe service talks to the database through 20 channels at once; the 21st request waits.
Payment gateway retries multiply loadFailed payments are retried automatically, and the retries doubled traffic on the database.

Before I send it I run two checks. First, would it survive being forwarded to their CFO without me on the call? Second, does every number have a unit and a time window? A figure without a window invites the wrong conclusion.

Failure modes

The main risk is oversimplifying so the client decides on a wrong premise. "It's just a cache" is a bad summary if the fix is a schema change that takes two sprints. The second is promising a date I can't defend because the client wants certainty. The third is holding bad news until the sprint review. I catch the first when the client's follow-up questions show a misunderstanding, and the last when status updates go quiet. My fix is a short written summary after every call, listing decisions, open questions and owners. Disagreement then surfaces in writing, where it is cheap to resolve.

When I go deeper

If the client's own engineers are in the room, I drop the translation and use their vocabulary. Vague answers get challenged fastest by technical people, and a precise answer with a clear trade-off earns more trust than a smooth one.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12Tell me about a time you disagreed with a team member. How did you resolve the conflict?

Reported in Globant Software Engineer Interview Questions (Updated 2026)

Opening answer (about 90 seconds)

I'd pick a disagreement about a technical decision with real stakes, not a personality clash, and I'd say up front that the figures below are illustrative. The setup: I was on a five-person squad building an order-status service for a retail client, with engineers split between Buenos Aires and Medellín and the client's team in another time zone. The client wanted order status delivered as a polling endpoint. My teammate Lucía wanted to push status changes through a webhook queue. I thought polling was wrong for this load.

The arithmetic I brought: about 300 storefronts polling GET /orders?status=shipped every 5 seconds is roughly 60 requests per second, most of them returning nothing new. Status changes ran around 800 per hour, which is about 0.22 events per second. Polling spends roughly 270 times more requests than the events it carries.

I didn't argue from preference. I wrote the comparison up and asked Lucía to find the holes in it, which she did, and she was right about one of them. Webhooks are at-least-once, so a consumer outage without replay loses events silently. My draft had no backfill path.

OptionLoad at 300 clientsMissed-event riskCost of getting it wrong
Polling every 5 s~60 req/s, mostly emptyNone, but up to 5 s staleWasted capacity, rate limits hit
Webhook only~0.22 events/sLost during consumer outageSilent data gaps
Webhook plus cursor backfill~0.22 events/s plus rare replaysCovered by after= replayMore endpoints to maintain

We settled on the hybrid. Webhooks carry each status change with an event_id, consumers dedupe on it, and a cursor endpoint GET /orders/events?after=<event_id> lets a client replay anything it missed. Lucía owned the webhook path and I owned the replay endpoint and a nightly reconciliation job that counts events per order and alerts on mismatches above 0.1%. That alert was the failure signal I cared about, because a lost event otherwise looks like a healthy system.

What I'd do differently: I'd ask about the client's outage tolerance in the first meeting, not the third. The disagreement was partly a gap in our requirements, and I'd rather find that on day one than in a design review.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13Tell me about how you apply object-oriented programming and functional programming concepts in your Java work.

Reported in Java OOP and Functional Programming

The 90-second answer

In the services I build on Java 21, I use OO for boundaries and functional style for the calculation inside them. Domain types that have a fixed set of variants get modelled as a sealed interface with records, so the compiler checks every case. Pricing is the clearest example. A discount is either a percentage, a fixed amount, or none, and the logic that turns a discount into money is a switch expression with no default branch. When someone adds a fourth discount type, the build fails at every site that needs updating. Collection transforms stay as stream pipelines with no shared mutable state. I stop using streams when the body needs checked exceptions, side effects or an index.

The model

Java
sealed interface Discount permits Percent, Fixed, NoDiscount {}
record Percent(BigDecimal rate) implements Discount {}
record Fixed(BigDecimal amount) implements Discount {}
record NoDiscount() implements Discount {}

static BigDecimal discountAmount(BigDecimal subtotal, Discount d) {
    return switch (d) {
        case Percent p -> subtotal.multiply(p.rate()).setScale(2, RoundingMode.HALF_EVEN);
        case Fixed f -> subtotal.min(f.amount());
        case NoDiscount n -> BigDecimal.ZERO;
    };
}

static BigDecimal subtotal(List<OrderLine> lines) {
    return lines.stream()
        .map(l -> l.unitPrice().multiply(BigDecimal.valueOf(l.qty())))
        .reduce(BigDecimal.ZERO, BigDecimal::add);
}

The records are immutable and subtotal has no side effects, so I can unit-test both with plain values. The Fixed case caps at the subtotal with min, so a coupon can never produce a negative total.

A trace

Order with two lines: 3 × 19.99 and 1 × 5.00. Subtotal is 59.97 + 5.00 = 64.97. Discount is Percent(0.10): 64.97 × 0.10 = 6.497, rounded HALF_EVEN to 6.50. Total 58.47. With Fixed(70.00), min returns 64.97, total 0.00. The second case is a deliberate edge I write a test for.

Where it goes wrong

  • A record with a List component is only shallowly immutable. I copy it in a compact constructor with List.copyOf, otherwise a caller can mutate a line item after the total is computed.
  • parallelStream() with a shared accumulator or a non-thread-safe collector produces wrong totals intermittently. I only parallelise pure reductions over large inputs, and I measure first. Below a few thousand elements the fork-join overhead usually loses.
  • Streams are single use. Reusing one throws IllegalStateException, which shows up in code that refactors a pipeline into two consumers.
  • Lambdas cannot throw checked exceptions. Wrapping IOException in a lambda hides it, so I move that I/O into an explicit loop.
  • Mutable state captured in a lambda is a bug that tests rarely catch, so I flag it in review.

Detection

The sealed hierarchy is enforced by the compiler, so a missing case is a build failure, not a runtime surprise. The rest is caught by property tests on the pure functions and by Java Flight Recorder when a stream-heavy endpoint shows unexpected allocation. I would not claim the functional style is faster by default. The gain is fewer places for state to go wrong, and that is what I defend in a review.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-14Implement a Promise.all polyfill.

Reported in Globant Software Engineer Interview Guide (2026): Process ...

The 60-second answer

I'd confirm the contract first. The input is any iterable. The result is a promise that resolves to an array in input order, not completion order. It rejects with the first rejection reason. Non-promise values count as already resolved. An empty input resolves immediately with an empty array.

JavaScript
function promiseAll(iterable) {
  return new Promise((resolve, reject) => {
    const items = Array.from(iterable);
    const results = new Array(items.length);
    let remaining = items.length;
    if (remaining === 0) {
      resolve(results);
      return;
    }
    items.forEach((item, i) => {
      Promise.resolve(item).then((value) => {
        results[i] = value;
        remaining -= 1;
        if (remaining === 0) resolve(results);
      }, reject);
    });
  });
}

I checked this against ES2015 semantics, which is what current runtimes implement.

Trace. Input: [delay(30, 'a'), 'b', delay(10, 'c')] (hypothetical delays).

t (ms)Eventresults
0index 1 wrapped by Promise.resolve, handler queued as a microtask[ , , ]
0index 1 handler runs, remaining 3 → 2[ , 'b', ]
10'c' settles, writes index 2, remaining 2 → 1[ , 'b', 'c']
30'a' settles, writes index 0, remaining 1 → 0, resolve fires['a', 'b', 'c']

Order comes from the index, not from the order promises finish. Pushing into an array inside then would give ['b', 'c', 'a'], which is the bug interviewers look for.

Why each piece is there.

  • Promise.resolve(item) handles plain values and thenables alike. Calling item.then directly throws on 1 and skips the thenable adoption rules.
  • The two-argument then attaches a rejection handler to every input synchronously. Native Promise.all does the same, so no input rejection gets reported as unhandled while the loop is still running.
  • Calling resolve or reject after the promise has already settled is a no-op. The guard is only needed to avoid extra work.

Failure modes to name.

  • No empty-array branch. The promise never settles and the caller hangs with no error.
  • Results pushed in completion order. Tests with mixed delays pass or fail depending on timing, which makes this hard to catch.
  • A non-iterable argument. Array.from(5) returns [] rather than throwing, so promiseAll(5) resolves to []. Native Promise.all(5) rejects with a TypeError because it requires an iterable. I'd mention this and add an explicit check if the spec matters.

Where it stops. Promise.all doesn't limit concurrency. Passing 10,000 fetches starts them all at once. For bounded work I'd use a worker pool of fixed size. For independent results where one failure should not discard the rest, Promise.allSettled is the right call.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-15Explain how you would implement a REST API endpoint that handles high traffic.

Reported in Globant Software Engineer Interview Questions (Updated 2026)

The 90-second answer

I'd start by pinning down the numbers: peak requests per second, p99 latency budget, payload size, and whether the endpoint is read-heavy or write-heavy. Those decide almost everything else. Assume for the example 3,000 req/s peak, a 200 ms p99 budget, and a read-mostly GET /products/{id} endpoint.

The design rests on three things: keep the handler cheap, push load to caches and the edge, and make the system degrade predictably when it saturates. Concretely: stateless handlers behind a load balancer, so capacity is just instance count; a cache-aside read path with a short TTL and a Cache-Control: public, max-age=30 header so CDNs absorb repeat reads; and a bounded connection pool to the database so overload turns into fast rejections rather than queueing.

Capacity arithmetic

Little's law gives concurrency: L = λ × W. At 3,000 req/s with a 40 ms average service time, you have 120 requests in flight. With a database pool of 20 connections and 15 ms of query time per request, the pool can serve about 1,333 req/s. So the database, not the app, is the bottleneck on a cache miss. That is the number that drives the design: a 90% cache hit rate cuts database load to 300 req/s, which the pool handles with room to spare.

LayerMechanismWhat it protects
CDN / HTTP cacheCache-Control, ETag, 304 responsesorigin request volume
Application cacheRedis, cache-aside, 30 s TTL, jittereddatabase reads
Connection poolbounded, 20 per instance, acquire timeout 100 msdatabase from overload
Rate limittoken bucket per API key at the gatewayfairness, abusive clients
Load shed503 + Retry-After when queue depth exceeds limitlatency of admitted requests

Failure modes I design for

A cache stampede happens when a hot key expires and thousands of requests miss at once. I use request coalescing (single-flight per key) and jittered TTLs so keys don't expire together. Detection: a spike in database QPS with flat cache hit rate.

Pool exhaustion looks like p99 climbing from 40 ms to 180 ms once requests start waiting for a connection, with CPU still low. Detection: the pool wait-time metric and the gap between p50 and p99. The fix is a short acquire timeout that returns 503 quickly, not a larger pool, because a larger pool just moves the queue into the database.

Retry storms: clients retrying on 503 multiply load. I return Retry-After, and clients use exponential backoff with full jitter. Writes need an Idempotency-Key so retries don't duplicate work.

What I'd say about the trade-off

Caching adds staleness. For product detail pages a 30 s window is acceptable; for inventory checks it is not, and I'd read those from the source or accept a conditional request with ETag instead. Horizontal scaling only helps if the handler holds no per-request state, so sessions go to a shared store or into signed tokens.

I'd verify all of this with a load test that ramps to 1.5x peak, watches the pool-wait and shed metrics, and confirms that at overload the 200 responses keep their latency budget while excess traffic gets fast 503s.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16How would you implement a 2D matrix in code, and how would you optimize it?

Reported in Implement and Optimize a 2D Matrix

The 60-second answer

First I'd confirm the element type, whether the dimensions are fixed, whether the matrix is dense or sparse, and whether reads or writes dominate. Assuming dense, fixed-size, numeric and read-heavy: store one flat buffer in row-major order and compute the index as r * cols + c. That gives one allocation, no per-row object headers, and row scans that walk memory sequentially.

TypeScript
class Matrix {
  private readonly data: Float64Array;
  constructor(readonly rows: number, readonly cols: number) {
    if (!Number.isInteger(rows) || !Number.isInteger(cols) || rows <= 0 || cols <= 0)
      throw new RangeError(`bad shape ${rows}x${cols}`);
    this.data = new Float64Array(rows * cols); // zero-filled
  }
  private idx(r: number, c: number): number {
    if (r < 0 || r >= this.rows || c < 0 || c >= this.cols)
      throw new RangeError(`(${r},${c}) out of bounds`);
    return r * this.cols + c;
  }
  get(r: number, c: number): number { return this.data[this.idx(r, c)]; }
  set(r: number, c: number, v: number): void { this.data[this.idx(r, c)] = v; }
}

Trace: new Matrix(3, 4) allocates 12 slots, indices 0 to 11. Element (2,1) maps to 2*4 + 1 = 9. Element (0,3) maps to 3. Typed arrays return undefined for out-of-range reads instead of throwing, which is why the explicit bounds check is there.

Optimization

ConcernChoiceWhy
Array of arraysone flat Float64Arraysingle allocation, no pointer chase per row
MemoryFloat32Array if precision allows10,000 x 10,000 doubles is 800 MB; floats halve it
Traversalouter loop over rows, inner over columnsa 64-byte cache line holds 8 doubles, so the inner loop reuses each fetch
Column-heavy worktranspose once, or block the loopscolumn walks stride by cols * 8 bytes and miss cache
Mostly zerosCSR (values, column indices, row pointers)1,000 x 1,000 at 1% density: dense is 8 MB; CSR is about 10,000 nnz x 12 B, roughly 120 KB plus row pointers

I'd only reach for sparse storage after measuring density. Below a few percent non-zero, CSR usually wins on memory and on row traversal; for random updates, a hash map keyed by r * cols + c is simpler but slower to scan.

Failure modes

  • Index overflow. rows * cols past 2^31 overflows a 32-bit int in Java or C#. Use long or size_t for the index and check the result against the runtime's maximum array length.
  • Silent reads of undefined from typed arrays in JavaScript, which turn into NaN downstream. The bounds check above catches it.
  • Aliasing when a view is returned. If row(r) returns a subarray, a caller's write mutates the matrix. Return a copy or document the view.

I'd confirm the choice with a benchmark: time row-major against column-major traversal at a size that exceeds L2 cache, and read cache-miss counters with perf or the equivalent. If the row-major loop isn't clearly faster, the layout assumption is wrong for this workload.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17Design a system to enforce file and code restrictions in a multi-team Git repository.

Reported in Globant Software Engineer Interview Guide (2026): Process ...

The 90-second answer

I'd split enforcement into two jobs. Review routing (who must approve a change to a path) goes in a CODEOWNERS file. Hard rules (what may never land, whatever the approvals) go in a server-side check that runs on every push. Client-side hooks are advisory only, because git push --no-verify skips them, so nothing that matters can live there.

Clarify first: is the host GitHub, GitLab or self-hosted Git with pre-receive hooks? Do teams need to restrict code (say, payments/ may not import internal/admin) or only files? I'll assume a hosted Git service with branch protection and a CI runner, and treat import rules as a CI check.

LayerEnforcesWhere it runsBypass risk
CODEOWNERSrequired reviewers per pathhost, on PRadmins if branch protection allows it
Branch protection / ruleset"require review from Code Owners" on protected brancheshost, on mergenone for non-admins
Path policy checkforbidden paths, size and file-type rulesserver pre-receive or required CI statusnone if required
Import/dependency lintforbidden package edgesrequired CI jobnone if required

The policy itself lives in the repo, under a path that only the platform team owns (.policy/ with its own CODEOWNERS line). Otherwise a team could edit the rule that blocks them.

Matching rules. CODEOWNERS uses the last matching pattern, so * @platform followed by /payments/ @payments-team routes payments to payments only if the second line comes after the first. Owners must have write access or GitHub silently ignores them, so I'd add a nightly job that lists CODEOWNERS entries with no writer.

Trace of one push. A developer pushes feature/x, changing payments/refund.go and renaming legacy/tax.go to payments/tax.go.

  1. Pre-receive gets old new ref lines. For a new branch old is 40 zeros, so the check diffs against the merge base with git diff --name-status --no-renames base..new.
  2. With rename detection on, the output is one R100 legacy/tax.go payments/tax.go line, and checking only the destination misses that a path under legacy/ disappeared. With --no-renames you get D legacy/tax.go and A payments/tax.go, and both are checked.
  3. The policy file says payments/ requires payments-team approval. The PR gets a required review, and the check reports payments/tax.go: owner approval pending.

Failure modes and detection

  • Symlinks: a symlink in an allowed path that points into a forbidden one. Check mode 120000 entries and reject them in restricted trees.
  • Submodules: a gitlink (mode 160000) bypasses file checks. Reject or pin them explicitly.
  • Check cost: diffing a large monorepo on every push. Track p95 check time; if it passes 10 s, restrict the diff to changed roots and cache the policy parse.
  • Stale owners: teams reorganise and CODEOWNERS points at deleted groups. The nightly writer-audit job catches it.
  • Override abuse: count admin merges that bypassed the required review each week, and alert on any non-zero trend.

When not to build this. For fewer than about five teams, a well-maintained CODEOWNERS with required review is usually enough. Custom pre-receive infrastructure is only worth running when a self-hosted server must enforce hard rules that a CI job could be disabled to skip.

Curated: · Written: · Reviewed:

Difficulty: Hard

Curated: · Written: · Reviewed: