cswork / libraryOpen practice workspace

Interview guides · By Mindlance

By Mindlance Software Engineer Interview Guide

By Mindlance Software Engineer interview guide: three reported rounds, coding, REST, system design and behavioral questions, plus a seven-day prep plan.

The 60-second brief

Candidate descriptions of By Mindlance present the Software Engineer as someone who builds and maintains software for clients. The work spans web applications and backend services and follows the full lifecycle: design and architecture, implementation, testing and deployment. Listed responsibilities include designing, developing and testing applications, taking part in code reviews, writing unit and integration tests, and working with product managers, designers and other engineers. The languages the role lists are Java, C# and Python, alongside SQL and database management and web development frameworks. Cloud services (AWS, Azure), Agile methods and front-end frameworks (React, Angular) appear as nice-to-have skills.

This guide is for candidates applying to By Mindlance as a Software Engineer. It covers the three rounds candidates report, the fifteen questions reported for the role (object-oriented design, version control, REST, performance, high load, three coding problems, system design and behavioral prompts), and a seven-day plan. It does not cover other By Mindlance roles. Answers are written so you can give them in Java, C# or Python, whichever language you will use in a coding stage.

Candidates report three stages over roughly 3-5 weeks: a screening call, technical assessments that include coding challenges, and in-depth structured interviews on technical skills and cultural fit.

Focus areas

  • Software Engineering Problem Solving
  • Technical Interview Rounds
  • Algorithms

Overview

The reported question set is broad rather than specialised. It mixes language-level concepts (abstract class versus interface, version control), web fundamentals (RESTful APIs, a slow application, a web server under heavy load), three classic coding problems (reverse a linked list, longest substring without repeating characters, binary search), system design topics (a social media application for millions of users, microservices, the CAP theorem) and four behavioral prompts. The questions are described as representative and as varying by team, so treat them as a map of the territory rather than a script.

Because the role lists Java, C# and Python, SQL, and web frameworks, the strongest preparation is to pick one language and answer every concept question in its terms. For abstract class versus interface that means knowing what your language actually allows: Java interfaces can carry default methods, C# interfaces can carry default implementations, and Python has abstract base classes instead. For REST, it means being able to describe how you would build an endpoint in the framework you have used, including routes, validation, status codes and persistence through SQL.

The performance and load questions reward a fixed order of work more than a list of buzzwords. Measure first, find the bottleneck (database query, network call, CPU, memory, a single hot endpoint), change one thing, and measure again. For a server under heavy load, separate what you do inside one machine (caching, query tuning, connection pooling) from what you do across machines (load balancing, horizontal scaling, queues, a CDN for static content).

The loop also includes a cultural-fit element, and the role description mentions code reviews, unit and integration tests, and collaboration with product managers and designers. Prepare two or three real stories from your own projects, written in the STAR structure, that cover a technical challenge, a disagreement with a colleague and a prioritisation call. Cloud (AWS, Azure), Agile and React or Angular are listed as nice-to-have, so have one honest sentence ready for each that you have touched.

The By Mindlance interview process

These are the three stages candidates describe, in the order they report them. The exact content of each stage varies by team.

Screening Call

Candidates report an initial call about your background and how it fits the role. It is the first of three reported stages, and it is the place to line your experience up with the stack the role lists: Java, C# or Python, SQL, web frameworks, and optionally cloud and front-end tools. Keep answers short and concrete, and finish by asking what the next stage involves, because candidates report that communication during the process varies.

What to demonstrate

  • Your background and fit for the role, as the stage is described
  • How clearly you summarise your experience with the languages and tools the role lists
  • Whether your expectations and availability match the position

How to prepare

  • Write a two-minute walkthrough of your CV that names one project, the stack you used (language, framework, database) and what you personally built.
  • Match each listed requirement to a real example: a language, SQL and database work, a web framework, and any AWS, Azure, React or Angular exposure.
  • Have short spoken answers ready for what motivates you to deliver high-quality work and how you prioritise tasks across projects, since both are reported behavioral questions.
  • Prepare two questions about the team and the next stage, and ask what format the technical assessments take.

Technical Assessments

Candidates report various technical evaluations, including coding challenges. The reported coding questions are reversing a linked list, finding the longest substring without repeating characters and implementing binary search, and the technical and problem-solving questions cover object-oriented design, version control, RESTful APIs and a slow application. The exact format is not reported, so practise both writing code and explaining concepts aloud. Work in one language you can write fluently without an IDE.

What to demonstrate

  • Working code for algorithm and data structure problems, since the stage includes coding challenges
  • Knowledge of the languages, frameworks and tools the role lists
  • How you reason about a problem and explain your steps

How to prepare

  • Write the three reported coding problems from a blank file in your chosen language: pointer reversal for the linked list, a sliding window with a last-seen index map for the substring, and a lo/hi loop for binary search. State the complexity of each.
  • Test each solution against the edge cases: an empty list or string, a single element, all duplicate characters, a target that is absent, and the first and last positions.
  • Practise explaining abstract class versus interface and the shape of a RESTful endpoint in under two minutes each, with a short code sketch.
  • Run a slow-application investigation out loud: measure, find the bottleneck, fix one thing, measure again.

In-Depth Interviews

Candidates report structured interviews that focus on technical skills and cultural fit. This is where the design questions (a social media application at the scale of millions of users, microservices considerations, the CAP theorem), the high-load web server scenario and the behavioral prompts are most naturally rehearsed, though which questions appear in which stage is not reported. Expect to discuss past projects and the technical challenges in them, so bring detail you can defend.

What to demonstrate

  • Technical skills as they show up in discussion of your past projects and design reasoning
  • Cultural fit, as the stage is described, through how you talk about teamwork and communication
  • How you structure an answer to an open-ended design or behavioral question

How to prepare

  • Outline a design for the social media application: services, a relational store for accounts and posts, a cache for hot reads, a queue for fan-out work, and where you accept stale data.
  • Write a one-paragraph answer to the CAP theorem with a concrete example, and a short list of microservices trade-offs (service boundaries, data ownership, network failure, deployment and monitoring overhead).
  • Prepare four STAR stories covering a technical challenge, a difficult team member, quality motivation and prioritisation, each with your own actions and a result from your real work.
  • Pick one past project and be ready to explain its architecture, your decisions, the tests you wrote and what you would change.

Where candidates lose points

Reversing the linked list but losing the rest of the list

Save the next pointer before you redirect the current node, and keep previous, current and next as three named variables. Run an empty list, a single node and a two-node list through the code by hand before you say it is done.

Writing binary search or the longest-substring window with an off-by-one error

Fix your loop invariant before coding (inclusive or exclusive upper bound, lo less than or equal to hi, mid computed as lo plus half the gap). For the substring, store each character's last index and only move the left edge forward with a max, never backward. Test with absent targets and repeated characters.

Answering a slow-application or high-load question with a list of fixes and no order

Open with measurement: where the time goes (database query, network call, CPU, memory). Fix the biggest bottleneck, remeasure, and only then add caching, indexes, connection pooling or more servers behind a load balancer.

Describing REST as a list of HTTP verbs, or the CAP theorem as pick any two

For REST, cover resources and URLs, verbs, status codes, idempotency, validation, pagination and the SQL behind it. For CAP, say that a network partition forces a choice between consistency and availability, and give one example of each choice.

Telling behavioral stories in the plural, with no personal decision and no result

Write each STAR story with the first person in the action section: what you decided, built or said. Finish with an outcome from your real project, and prepare four stories to match the four reported behavioral prompts.

Questions & practice

Write a function to reverse a linked list.

Medium · Coding / Algorithms

Approach

  1. Use the iterative three-pointer method: prev = null, curr = head; on each step save next = curr.next, set curr.next = prev, then advance prev = curr and curr = next; when curr is null, prev is the new head.
  2. State the cost: O(n) time and O(1) extra space, since each node is visited once and only its pointer is rewritten in place.
  3. Explain why next must be saved first: once curr.next points back to prev, the rest of the list is unreachable unless you kept a reference to it.
  4. Mention the recursive version (reverse the rest, then set head.next.next = head and head.next = null) and its cost: O(n) call-stack depth, which can overflow on long lists (Python's default recursion limit is 1000).
  5. Test the edge cases aloud: empty list, single node, two nodes, and confirm the old head now points to null so the reversed list does not contain a cycle.

Follow-up

  • Reverse only the nodes between positions m and n, in one pass.
  • Reverse the list in groups of k nodes, leaving a final group shorter than k unchanged.
  • Use reversal to check whether a linked list is a palindrome in O(1) extra space.

How would you find the longest substring without repeating characters in a given string?

Medium · Coding / Algorithms

Approach

  1. Name the brute force first: checking every substring for duplicates is O(n^3), or O(n^2) if you extend each start index with a set until a repeat appears.
  2. Use a sliding window with a map from character to its last seen index: for each index i, if the character was seen at an index >= left, move left to that index + 1; then update the map and the best length i - left + 1.
  3. Point out the classic bug: left must only move forward (left = max(left, last[c] + 1)), because a stale occurrence before the window would otherwise pull left backwards, as in "abba".
  4. State the cost: O(n) time, since each index is processed once, and O(min(n, k)) space for an alphabet of size k; a fixed array of 128 or 256 entries works for ASCII.
  5. Cover edge cases: empty string returns 0, a string of one repeated character returns 1, all-distinct returns n, and decide up front whether case matters and how Unicode characters are handled.

Follow-up

  • Return the substring itself, not just its length.
  • Find the longest substring with at most k distinct characters.
  • How would you adapt this if the characters arrive as a stream too long to store?

Implement a binary search algorithm.

Medium · Coding / Algorithms

Approach

  1. Confirm the precondition: the array is sorted (ascending, and whether duplicates exist), then keep the invariant that if the target is present it lies within [lo, hi].
  2. Write the loop: lo = 0, hi = n - 1, while lo <= hi compute mid = lo + (hi - lo) / 2, return mid on a match, set lo = mid + 1 if a[mid] < target, else hi = mid - 1; return -1 when the loop ends.
  3. Explain the mid formula: (lo + hi) / 2 can overflow 32-bit integers in Java or C# on very large arrays, a bug that shipped in Java's own Arrays.binarySearch for years; Python integers do not overflow.
  4. State the cost: O(log n) time, O(1) space iteratively; a recursive version uses O(log n) stack.
  5. Know the lower-bound variant for duplicates: with a half-open range [lo, hi), hi = n, while lo < hi, move hi = mid when a[mid] >= target, else lo = mid + 1; lo ends at the first index not less than target (what Python's bisect_left returns). Test empty, single-element, and targets below the minimum or above the maximum.

Follow-up

  • Return the first and last positions of a target that appears several times.
  • Search for a target in a sorted array that has been rotated at an unknown pivot.
  • Use binary search on the answer: find the integer square root of n, or the minimum capacity that ships all packages within D days.

Hold a per-tenant active cap against concurrent creates

Hard · write skew · isolation levels · constraints

A tenant on the standard plan may hold at most 50 resources with status='active'. The create handler runs SELECT count(*) FROM resource WHERE tenant_id = $1 AND status = 'active', compares to 50, then inserts. Two creates arrive 3 ms apart on different instances and the tenant lands at 51. Name the anomaly, say whether PostgreSQL 16 READ COMMITTED or REPEATABLE READ prevents it and why, then give an implementation that holds the cap at READ COMMITTED with the exact statements. Finally, say what changes when the cap is 'at most one running export per tenant' on job_run.

Approach

  1. Name it: write skew. The two transactions read an overlapping set and write disjoint rows, so there is no row-level conflict for the engine to detect and each commit is individually legal.
  2. Rule out the levels precisely. READ COMMITTED takes a fresh snapshot per statement and takes no lock on the counted rows, so both see 49. PostgreSQL's REPEATABLE READ is snapshot isolation: it removes non-repeatable reads and phantoms within the snapshot but still admits write skew, because the anomaly is not a re-read of a changed row, it is a read of a set that a concurrent transaction invalidates. Only SERIALIZABLE closes it, by tracking the read dependency and aborting one transaction with SQLSTATE 40001 — a guarantee that exists only if the application re-runs the whole transaction from the read.
  3. Convert the set predicate into a single-row conflict: keep tenant.active_resource_count and run UPDATE tenant SET active_resource_count = active_resource_count + 1 WHERE tenant_id = $1 AND active_resource_count < 50 in the same transaction as the INSERT. Zero affected rows is the cap, returned as 409. The row lock serialises the decision at any isolation level, and contention is bounded to one tenant's row — which is also the fair-scheduling unit, unlike a global counter that would convoy every tenant behind one row.
  4. State the cost you just took on: a counter is a second source of truth that can drift, so every path that changes status must adjust it inside the same transaction, and a periodic reconciliation has to exist, with resource_revision as the authority for what the count should have been.

Follow-up

  • A resource moves from archived back to active. Which statements change, and what breaks if the counter update and the status change land in different transactions?
  • The cap becomes plan-dependent and a plan can change mid-month. Where does the number 50 live, and who reads it?

Explain why the owner filter ignores the listing index

Medium · composite index · query plans · sort elimination

The only index on resource is (tenant_id, status, updated_at DESC, resource_id DESC). A new endpoint returns one user's resources across all statuses, newest created first: WHERE tenant_id = $1 AND owner_user_id = $2 ORDER BY created_at DESC LIMIT 20. On a tenant with 2M rows it takes 900 ms and EXPLAIN shows a sort above a large scan. Explain precisely why the existing index cannot serve it, give the index that can, and state which of these the new index still will not help: owner_user_id alone across tenants; the same query ordered by updated_at. PostgreSQL 16.

Approach

  1. Separate the two jobs an index does. For filtering, a composite btree is seekable only on a left prefix, so with no predicate on status the scan can at best range over tenant_id and test owner_user_id per row; PostgreSQL 16 has no btree skip scan to jump the unconstrained column.
  2. For ordering, the index is sorted by (status, updated_at) within a tenant and not by created_at, so the LIMIT cannot stop early: every matching row is read and then sorted. That is the 'Sort Method: top-N heapsort' line, and it is why the plan reads 2M rows to answer with 20.
  3. Derive the replacement from the access path — equality, equality, then the ordering column: CREATE INDEX CONCURRENTLY ON resource (tenant_id, owner_user_id, created_at DESC). The scan seeks to the (tenant, owner) range and walks 20 entries in order, so the Sort node disappears along with the row-read.
  4. Treat INCLUDE (title, status) as conditional, not free. An index-only scan still visits the heap for any row whose page is not marked all-visible, so on a table taking 1.2k writes/second the win depends on autovacuum keeping the visibility map current, and the wider index costs more on every insert.

Follow-up

  • 90% of rows are status='active'. Would a partial index WHERE status = 'active' change your answer, and for which of the three queries?
  • A dashboard runs this for 40 owners in one page load. What changes about the design?

Explain the difference between an abstract class and an interface in object-oriented programming.

Medium · Technical / Domain Questions

Approach

  1. Start with the contract difference: an abstract class is a partial implementation that can hold instance state (fields), constructors and methods of any access level, while an interface declares a capability that many otherwise unrelated types can implement.
  2. Name the inheritance rule: in Java and C# a class extends at most one class but can implement many interfaces, so an interface is the tool for mixing several capabilities (Comparable, Serializable) into one type.
  3. Cover how modern versions blur the line: Java 8 added default and static interface methods (Java 9 added private ones) and C# 8 added default interface members, but interfaces still cannot hold per-instance state; Java interface fields are implicitly public static final.
  4. Mention Python, since the role lists it: there is no interface keyword; abc.ABC with @abstractmethod blocks instantiation until every abstract method is overridden, and typing.Protocol gives structural (duck-typed) interfaces checked by static type checkers.
  5. Close with a decision rule and an example: choose an abstract class when closely related types share state and a template method (an abstract Report with a fixed render() that calls an abstract body()), and an interface when you only need a contract that callers can depend on or mock in tests.

Follow-up

  • In Java, what happens when a class implements two interfaces that both supply a default method with the same signature, and how do you resolve it?
  • Why is adding a new abstract method to a published interface a breaking change, and how do default methods soften that?
  • Would you inject an abstract class or an interface into a service you want to unit-test, and why?

What is the purpose of a version control system, and how do you use it in your projects?

Medium · Technical / Domain Questions

Approach

  1. Give the purposes concretely: a full history of who changed what and why, the ability to restore any earlier state, parallel work on branches without overwriting each other, and a review point (pull request) before code reaches the main branch.
  2. Describe a workflow you actually use with Git: a short-lived feature branch per task, small commits that each build and carry a message saying why, a pull request with CI running tests, review, then merge; releases marked with tags.
  3. Explain merge versus rebase: merge keeps the true branch history with a merge commit; rebase replays your commits for a linear history but rewrites their hashes, so never rebase commits others have already pulled.
  4. Show you can recover from mistakes: git revert adds a new commit that undoes a pushed change safely, git reset moves the branch pointer and is only safe on local unpushed work, and git reflog finds commits you thought were lost.
  5. Mention conflict handling: resolve the conflicting hunks, rerun the build and tests before completing the merge, and keep branches short to reduce conflicts in the first place.

Follow-up

  • A bad commit was pushed to the shared main branch an hour ago. How do you undo it without disrupting teammates?
  • How would you use git bisect to find the commit that introduced a regression, and how many builds does it need for 1,000 commits (about 10, since it halves the range each step)?
  • What belongs in .gitignore, and what do you do if a secret was already committed?

Describe the concept of RESTful APIs and how you would implement one.

Medium · Technical / Domain Questions

Approach

  1. Define REST through its constraints: resources identified by URIs (/orders/42), a uniform interface built on HTTP methods, stateless requests that carry their own authentication, and representations (usually JSON) exchanged between client and server.
  2. Map methods to semantics precisely: GET is safe and idempotent, PUT and DELETE are idempotent, POST is neither (it creates or triggers), and PATCH is not guaranteed to be idempotent; use nouns in paths and let the method carry the verb.
  3. Return meaningful status codes: 201 Created with a Location header after a create, 204 for an empty success, 400 for malformed input, 401 for missing or bad credentials versus 403 for an authenticated caller without permission, 404, 409 for a conflict, 429 when rate limited.
  4. Outline an implementation in a stack the role lists (Spring Boot @RestController, ASP.NET Core controllers, or Flask/FastAPI): a controller that validates input, a service layer with the business rules, a repository that uses parameterised SQL, and one consistent JSON error format.
  5. Cover the production details: paginate list endpoints (cursor-based for large or changing data, offset for simple cases), version the API (/v1/ path or a header), and support caching with ETag plus If-None-Match returning 304 Not Modified.

Follow-up

  • A client retries a POST that timed out. How do you stop it from creating a duplicate order?
  • Why does offset pagination break or slow down on a large table that keeps receiving inserts, and how does a cursor fix it?
  • How would you secure this API, and where would you validate a bearer token?

How would you approach optimizing a slow-performing application?

Medium · Problem-Solving / Case Studies

Approach

  1. Measure before changing anything: pin down which operation is slow, for whom, and since when, and record a baseline in percentiles (p50, p95, p99) rather than an average, reproduced under a known load.
  2. Find where the time goes with tools, not guesses: request tracing or an APM to split time across application code, database and downstream calls; a CPU profiler or flame graph for hot code; the database slow-query log and EXPLAIN ANALYZE for queries.
  3. Check the usual causes in order of likelihood: N+1 queries from an ORM loop, a missing or unusable index (a function wrapped around the filtered column), independent remote calls made one after another, oversized payloads or unpaginated lists, lock contention, and memory pressure causing long garbage-collection pauses.
  4. Apply the fix that matches the cause: add or correct the index, batch or join the queries, run independent calls concurrently, cache read-heavy results with an explicit invalidation or TTL rule, and move slow non-interactive work to a background queue.
  5. Verify with the same benchmark and load as the baseline, change one thing at a time so the gain is attributable, and add a metric or alert so the regression is caught if it returns.

Follow-up

  • The endpoint is fast locally but slow in production. What differs, and what do you check first?
  • How do you recognise an N+1 query problem in logs or traces, and how do you fix it in the ORM you use?
  • When can adding a cache make the system worse?

Given a scenario with a high load on a web server, what strategies would you implement to handle the traffic?

Medium · Problem-Solving / Case Studies

Approach

  1. Find the bottleneck before scaling: check CPU, memory, open connections and thread or worker pool saturation on the web tier, and database query latency and connection count, because adding web servers does not help if the database is the limit.
  2. Scale horizontally: put stateless application servers behind a load balancer (round robin or least connections) with health checks, keep session state in a shared store such as Redis or in signed tokens, and autoscale on CPU or request rate.
  3. Cut work per request: serve static assets from a CDN, set Cache-Control headers, cache hot read results in memory or Redis, and use connection pooling plus read replicas so the database handles fewer and cheaper queries.
  4. Move slow work out of the request path: write the job to a message queue and process it with background workers, returning 202 Accepted when the client does not need the result immediately.
  5. Protect the system when load still exceeds capacity: rate limit per client (token bucket) with 429 responses, set timeouts and circuit breakers on downstream calls, and shed or degrade non-essential features instead of letting every request time out.

Follow-up

  • Autoscaling takes minutes to add capacity. How do you survive a sudden spike in the meantime?
  • What are the trade-offs of sticky sessions on the load balancer compared with a shared session store?
  • The web tier now scales, but the database is at 100% CPU. What are your next three moves?

How would you design a system for a social media application to handle millions of users?

Medium · System Design / Architecture

Approach

  1. Fix scope and estimates before drawing: pick the core features (post, follow, home feed, like), state assumptions such as daily active users and posts per user, and derive read and write rates; a feed system is heavily read-dominated.
  2. Lay out the components: load balancer and API gateway, stateless services (users, posts, social graph, feed), a database sharded by user_id, object storage behind a CDN for images and video, and a Redis cache holding each user's precomputed feed as a list of post ids.
  3. Choose the feed strategy and its trade-off: fan-out on write pushes a new post id into every follower's cached feed (fast reads, expensive for accounts with millions of followers); fan-out on read merges followed users' posts at request time (cheap writes, slow reads); a hybrid fans out for normal accounts and merges celebrity posts at read time.
  4. Make writes asynchronous where the user does not wait: publish a post-created event to a message queue and let workers do the fan-out, notifications and counters; use time-sortable ids (Snowflake-style) so feeds sort without extra lookups.
  5. State consistency choices: the feed and like counts can be eventually consistent, while a user should see their own post immediately (read-your-writes), and paginate the feed with a cursor rather than an offset.

Follow-up

  • An account with 50 million followers posts. Walk through what happens in your design.
  • One shard is much hotter than the others. How do you detect and fix it?
  • How do you keep like counts accurate under very high write rates?

What considerations would you take into account when designing a microservices architecture?

Medium · System Design / Architecture

Approach

  1. Draw service boundaries around business capabilities (orders, payments, inventory), each owning its own data store; a shared database between services recreates the coupling microservices were meant to remove.
  2. Choose communication per interaction: synchronous REST or gRPC when the caller needs an answer now, asynchronous events through a message broker when it does not, which also decouples availability between services.
  3. Design for partial failure: timeouts on every remote call, retries with exponential backoff and jitter only for idempotent operations, circuit breakers to stop cascading failures, and idempotency keys so a retried message is not applied twice.
  4. Handle consistency without distributed transactions: a saga that runs local transactions in sequence with compensating actions on failure, plus the transactional outbox pattern so a database write and its event publish cannot diverge.
  5. Plan the operations side and name the cost: distributed tracing with correlation ids, central logs and metrics, independent CI/CD per service, versioned API contracts, service discovery and an API gateway; for a small team or unclear domain, a modular monolith is often the better starting point.

Follow-up

  • An order must reserve inventory and charge a card in two different services. How do you keep them consistent if the charge fails?
  • How would you split an existing monolith without a big-bang rewrite?
  • How do you change a service's API without breaking its consumers?

Explain the CAP theorem in distributed systems.

Medium · System Design / Architecture

Approach

  1. State the theorem precisely: when a network partition occurs, a distributed data store must choose between consistency (every read returns the most recent write, i.e. linearizability) and availability (every request to a non-failed node gets a non-error response).
  2. Correct the 'pick two of three' framing: partitions are not optional in real networks, so the real choice is C or A during a partition; a 'CA' system amounts to one that does not tolerate partitions.
  3. Give examples of each side: CP systems such as ZooKeeper or etcd use majority quorums, so the minority side of a partition rejects or stalls requests; AP systems in the Dynamo style keep accepting reads and writes on both sides and reconcile later, at the risk of stale reads or conflicting writes.
  4. Mention tunable consistency: with N replicas, write quorum W and read quorum R, choosing R + W > N makes read and write quorums overlap, so a read reaches at least one replica with the latest acknowledged write; Cassandra exposes this per query.
  5. Tie it to a decision and its limits: an account balance or inventory count favours consistency, a social feed or shopping cart tolerates staleness; extend with PACELC (if partitioned choose A or C, else choose latency or consistency), and note that the C in CAP is not the C in ACID.

Follow-up

  • With N = 3 replicas, which R and W values give strong reads, and what does each choice cost in latency and availability?
  • What does a client of a CP system experience during a partition, and how should the application handle it?
  • How does an AP system resolve two conflicting writes made on opposite sides of a partition?

Read latency spikes on a sixty-second sawtooth

Medium · cache stampede · single-flight · ttl

The cached listing read path serves about 14k reads/second at an 85% hit rate. p99 sits at 35 ms for 57 seconds, jumps to 900 ms for 3, and repeats. During each spike the primary shows several hundred identical listing queries starting within the same millisecond, all carrying one large tenant's id. Cache entries use a 60-second TTL. Give the mechanism, the ordered checks, the fix, and the correctness hazard your fix must not introduce.

Approach

  1. Match the period to a configured number before theorising about load. A spike every 60 seconds against a 60-second TTL is an entry expiring, and you confirm it by correlating spike timestamps with the entry's write time rather than with the traffic curve. If the period had matched a cron or a GC interval instead, this is a different investigation.
  2. Establish the concurrency of the miss. Several hundred identical queries in one millisecond means the miss path has no coalescing: every request that arrives between expiry and repopulation recomputes. The herd size is that key's arrival rate times its recompute time, so at 1.2k reads/second for the hot key and a 250 ms recompute you expect about 300 concurrent misses, which matches what is observed.
  3. Add single-flight on the miss path so one caller per key recomputes under a short-lived lock while the rest wait for its result. Prefer stale-while-revalidate where the read tolerates it: return the expired value immediately and refresh asynchronously, which removes the latency spike rather than serialising it into a queue of waiters.
  4. De-synchronise the keys. Write TTLs with jitter, for example 60 seconds plus or minus 10%, so a deploy or a mass invalidation does not align every key on the same second and turn a per-key herd into a fleet-wide one.

Follow-up

  • The same sawtooth appears on a key that is invalidated on write rather than expired. Is that the same bug?
  • How does your answer change if the recompute takes 4 seconds instead of 250 ms?

Suggested practice checklist

The plan follows the three reported rounds: background and stack on day one, concept questions on days two and three, coding on day four, design and load on days five and six, and behavioral stories on day seven.

Day 1 — Map the loop and your stack

  • Write down the three reported stages (screening call, technical assessments, in-depth interviews) and what each is described as covering.
  • List the listed requirements (Java, C# or Python, SQL, web frameworks, and the nice-to-haves) and write one real project example next to each you can claim.
  • Write and time a two-minute CV walkthrough that names one project, its stack and your contribution.

Deliverable: A one-page map of the three rounds, a requirements-to-examples table and a timed CV script.

Day 2 — Object-oriented design and REST

  • Write a comparison of abstract class and interface in your chosen language, with a code example showing shared state versus a pure contract, and one rule for when you pick each.
  • Design one RESTful resource end to end (routes, verbs, status codes, validation, pagination) and write the handler in your usual framework.
  • Say both answers aloud in under two minutes each.

Deliverable: A written abstract-class-versus-interface answer with code, and a working sketch of one REST resource with its status codes.

Day 3 — Version control, slow applications and SQL indexes

  • Write how you use version control on a real project: branching, pull requests, review, resolving a merge conflict, and reverting a bad commit.
  • Write a numbered investigation plan for a slow application (measure, find the bottleneck, change one thing, remeasure) and apply it to a slow database query.

Deliverable: A version-control workflow answer, a slow-application checklist and a one-paragraph note on an index that was not used.

Day 4 — Coding problems

  • Write the linked-list reversal both iteratively and recursively, and state time and space for each.
  • Write the longest-substring solution with a last-seen index map, then write the brute-force version and compare complexity.
  • Write binary search with a stated invariant, then run it on empty input, a single element and an absent target.

Deliverable: Three working solutions in one language, each with complexity noted and its edge-case tests passing.

Day 5 — High load, microservices and CAP

  • Write a layered answer for a web server under heavy load: tune one machine first, then load balancing, horizontal scaling, caching and queues.
  • List the trade-offs of microservices (service boundaries, data ownership, network failure, deployment and monitoring overhead) and when you would not use them.
  • Write a CAP explanation with a concrete example of choosing consistency and one of choosing availability during a partition.

Deliverable: A high-load answer in layers, a microservices trade-off list and a CAP explanation with two examples.

Day 6 — Social media design and production debugging

  • Outline a design for a social media application for millions of users: services, data stores, a cache for hot reads, a queue for fan-out, and what you allow to be stale.

Deliverable: A one-page design outline, a note on the concurrency fix and a numbered debugging sequence.

Day 7 — Behavioral stories and a full rehearsal

  • Write four STAR stories in the first person for the technical challenge, difficult team member, quality motivation and prioritisation prompts, each with a result from your real work.
  • Speak each story aloud and cut it to the decisions you made.
  • Do a full run: CV walkthrough, one concept question, one coding problem and one design outline, speaking throughout.

Deliverable: Four STAR stories with real outcomes and one recorded full rehearsal.

Stories to prepare for By Mindlance

Candidates report that the in-depth interviews cover cultural fit alongside technical skills, and the reported behavioral prompts concern a technical challenge, a difficult team member, quality motivation and prioritisation. For a role that lists code reviews, tests and work with product managers, designers and other engineers, the stories should show your own decisions, how you worked with others, and a result you can describe.

  1. Describe a time when you had to debug a complex issue.
  2. Can you give an example of how you adapted your communication style for different audiences?

Describe a time you faced a significant technical challenge and how you resolved it.

Medium · Problem-Solving / Case Studies

Approach

  1. Choose a challenge with a visible symptom from your own work, such as a slow endpoint, a flaky deployment, a data inconsistency or a memory leak, and say in two sentences why it mattered to the client or the team.
  2. Spend most of the answer on your actions: the hypotheses you formed, how you narrowed them down (logs, a profiler, bisecting commits, reproducing locally), the options you weighed and why you picked one.
  3. Separate your contribution from the team's. Say what you decided and built, and what colleagues or reviewers added.
  4. Report a result from your real project with a before and after (response time, error rate, hours saved) or a concrete outcome such as the release going out. Never invent a number you cannot defend.
  5. Close with what you changed afterwards to stop a repeat, such as a regression test, an alert or a short write-up for the team. A story that only describes how hard it was, with no decision in it, is the one that fails.

Follow-up

  • What alternative did you consider and why did you reject it?
  • How did you confirm your change caused the improvement?
  • What would you do differently if the same problem came up again?

Can you describe a situation where you had to work with a difficult team member and how you handled it?

Medium · Behavioral / Leadership

Approach

  1. Pick a conflict about work, such as missed handoffs, repeated review disagreements or unclear ownership, rather than a personality complaint. Describe the specific behaviour and its effect on delivery in neutral terms.
  2. Show that you spoke to the person directly and early, asked about their constraints, and listened before proposing anything.
  3. Describe the concrete agreement that came out of it: a review turnaround, a written interface or ticket description, a short weekly sync, or a split of responsibilities.
  4. Say when you involved a manager or lead and why, if you did. Escalating first without a direct conversation, or describing the person as the problem, sinks the story.
  5. End with the outcome for the project and the working relationship, and one thing you learned about your own part in the friction.

Follow-up

  • What would you have done if the direct conversation had not helped?
  • When did you bring your manager in, and what did you ask them for?
  • What did you change in your own behaviour afterwards?

What motivates you to deliver high-quality work?

Medium · Behavioral / Leadership

Approach

  1. Answer with a motivator and the habits that prove it rather than a slogan. Good examples are owning what runs in production, respecting the reviewer's time, or not wanting the client to find the bug first.
  2. Name the practices that follow from it: unit and integration tests for the code you change, small pull requests, reading your own diff before review, and checking behaviour after deployment. The role description lists code reviews and tests, so tie your answer to them.
  3. Include one short example where that effort paid off, such as a test that caught a regression or a review comment that prevented an outage, with the real outcome.
  4. Address the trade-off honestly: when a deadline is tight, say what you cut (scope, polish) and what you refuse to cut (tests on the critical path, data safety).
  5. Keep it brief and personal. Phrases such as being passionate about quality with no behaviour behind them are what weaken this answer.

Follow-up

  • Tell me about a time you shipped something below your own standard and what you did next.
  • How do you keep quality up when a client deadline is tight?
  • How do you handle a teammate whose standards are lower than yours?

How do you prioritize tasks when working on multiple projects?

Medium · Behavioral / Leadership

Approach

  1. State the method before the story: list every commitment with its deadline, impact, dependencies and rough effort, then rank by impact and urgency, and move first anything that blocks other people.
  2. Make the list visible in one place, such as a ticket board or a shared document, so stakeholders can see the order and correct it.
  3. Describe a real clash, for example a production bug landing during a feature deadline: what you ranked first, what you delayed, and how you told each stakeholder the new date and the reason before it slipped.
  4. Show that you re-rank when facts change, such as an unexpected incident or a changed requirement, instead of holding to the first plan.
  5. The answer that fails is working longer hours with no mechanism. Show a way of deciding, and one trade-off you made on purpose.

Follow-up

  • Two stakeholders each say their project is the top priority. How do you decide?
  • How do you handle a production incident in the middle of a sprint?
  • How do you tell a client or manager that something will not be done on time?