cswork / libraryOpen practice workspace

Interview guides · Metromile

Metromile Software Engineer Interview Guide

Metromile Software Engineer interview guide: reported rounds, questions and how candidates describe the process.

The 60-second brief

A Software Engineer at Metromile plays a pivotal role in redefining the auto insurance industry through technology. By leveraging real-time telematics, machine learning, and data-driven applications, engineers build the core systems that power pay-per-mile insurance. Your work will directly impact how millions of miles of driving data are ingested, processed, and translated into fair, transparent pricing for customers. In this role, you will work on highly complex, scalable systems that handle massive streams of geospatial and sensor data from OBD-II devices. Whether you are optimizing the mobile platform, refining backend APIs, or building intuitive frontend visualization tools, your contributions will drive key product features.

This guide is scoped to a Software Engineer candidate at Metromile.

Focus areas

  • JavaScript
  • Problem solving (coding exercises)
  • Data Structures & Algorithms (DSA)

The Metromile interview process

Metromile candidates report 5 rounds over 4-6 weeks. The stages below are what candidates describe, not a published process.

Recruiter Screen

Initial conversation with a recruiter to discuss your background and fit for the role.

What to demonstrate

  • Initial conversation with a recruiter to discuss your background and fit for the role
  • Depth in JavaScript

How to prepare

  • Be able to walk your CV end to end in two minutes, and say why this company specifically.
  • Have your salary expectations, notice period and location constraints ready, and ask for the rest of the loop in writing.

Hiring Manager Chat

Discussion with the hiring manager about your background and team fit.

What to demonstrate

  • Discussion with the hiring manager about your background and team fit
  • Depth in JavaScript

How to prepare

  • Prepare two projects you led end to end, each with the decision you owned and what it cost.
  • Have three questions about the team's roadmap and how success is measured in the first six months.

Technical Phone Screen

Live coding interview to assess your technical capabilities.

What to demonstrate

  • Live coding interview to assess your technical capabilities
  • Depth in JavaScript

How to prepare

  • Be able to walk your CV end to end in two minutes, and say why this company specifically.
  • Have your salary expectations, notice period and location constraints ready, and ask for the rest of the loop in writing.

Onsite Interview

Multiple rounds covering coding, system design, and behavioral evaluations.

What to demonstrate

  • Multiple rounds covering coding, system design, and behavioral evaluations
  • Depth in JavaScript

How to prepare

  • Answer aloud and timed: Design a notification system that alerts users via the mobile app when their vehicle has been parked in a street-sweeping zone.
  • Answer aloud and timed: Explain how you would handle API versioning and backward compatibility for mobile clients in a microservices architecture.

Senior Leadership Conversation

Final discussion with senior leadership or the CTO.

What to demonstrate

  • Final discussion with senior leadership or the CTO
  • Depth in JavaScript

How to prepare

  • Answer aloud and timed: Walk me through a complex project on your resume, explaining the technical trade-offs you had to make and why.
  • Answer aloud and timed: Tell me about a time you had a strong technical disagreement with a senior team member or architect. How did you handle it?

Where candidates lose points

Keep it collaborative

Treat every technical round as a conversation. Talk through your design choices, explain your assumptions, and do not hesitate to ask your interviewer for clarification if a problem statement seems ambiguous.

Watch out for strong technical biases during architectural discussions

Some senior interviewers may have specific preferences regarding technologies or design patterns. If you face pushback on a proposal, remain calm, defend your stance logically, and show a willingness to adapt to their feedback.

Focus on edge cases

When coding, do not just write the happy path. Proactively write test cases, handle potential exceptions, and discuss how your code would perform under extreme inputs.

Questions & practice

Write a program to count the number of occurrences of a specific word in a book, and discuss how you would opt

Medium · Coding & Algorithms

Write a program to count the number of occurrences of a specific word in a book, and discuss how you would optimize it for very large texts.

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Implement a solution to reverse a linked list or manipulate strings without using built-in high-level library

Medium · Coding & Algorithms

Implement a solution to reverse a linked list or manipulate strings without using built-in high-level library functions.

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Given an array of driving distances, find the optimal combination of trips that fit within a specific mileage

Medium · Coding & Algorithms

Given an array of driving distances, find the optimal combination of trips that fit within a specific mileage limit.

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Solve a series of Javascript puzzles focusing on asynchronous execution, closures, and scoping.

Medium · Coding & Algorithms

Approach

  1. Say what the runtime actually does before reasoning about the code.
  2. Name what is shared across threads and what owns each piece of state.
  3. Identify the window where an invariant is briefly untrue.
  4. Distinguish a value from a reference to it, and say which one you handed out.

Follow-up

  • What happens if two callers reach this at the same time?
  • Where could this allocate more than you expect?

How would you structure a database schema to support fast queries for historical trip data while minimizing st

Medium · System Design & Architecture

How would you structure a database schema to support fast queries for historical trip data while minimizing storage costs?

Approach

  1. Name the grain you start from and join outward from it.
  2. Check whether any join is one-to-many before aggregating, or the sums inflate.
  3. Say which index the query would use, and what makes it unusable.
  4. Handle the rows that do not match: that is usually the actual question.

Follow-up

  • How does the query change if that join becomes one-to-many?
  • What happens to this when the table is ten times larger?

Denormalise tenant onto revisions and backfill it live

Hard · denormalisation · online migration · backfill

resource_revision (revision_id, resource_id, version, actor_user_id, change_kind, patch, request_id, created_at) has 400M rows and no tenant column; tenant_id lives only on resource. Two reads need it: a tenant-scoped audit feed ordered by created_at DESC, and an offboarding purge. Both join back to resource today. Justify adding tenant_id to resource_revision against those two reads, name the anomaly the copy introduces and the constraint that prevents it, then give the ordered migration for a live table taking 1.2k writes/second — the lock each step takes, how the backfill is batched, and where each step stops being reversible. PostgreSQL 16.

Approach

  1. Justify from the access path rather than from taste. Without the column, the audit feed either scans resource_revision by created_at and discards other tenants' rows, or resolves the tenant's resource_ids first and probes with them — both proportional to the tenant's whole history rather than to one page. With (tenant_id, created_at DESC, revision_id DESC) it is a seek that stops at 50 rows, and the purge becomes a ranged delete instead of a join.
  2. Name the cost exactly: a second copy of a fact can disagree with the first. Make the disagreement unwritable rather than documented — add UNIQUE (resource_id, tenant_id) on resource so it can serve as a foreign-key target, then FOREIGN KEY (resource_id, tenant_id) REFERENCES resource (resource_id, tenant_id) on the revision table. A revision can then only ever carry its parent's tenant.
  3. Step one, expand: ALTER TABLE resource_revision ADD COLUMN tenant_id BIGINT NULL, with no default, so it is a catalogue change and no rewrite. It still needs ACCESS EXCLUSIVE for an instant, and that instant queues behind the longest open transaction on the table while every later query queues behind it — set lock_timeout to 2s and retry rather than wait.
  4. Step two, dual-write: deploy the writer that populates tenant_id on every new revision while reads still use the join. Reversible by redeploying the previous build, because nothing reads the column yet.

Follow-up

  • The backfill is half finished and a rollback is required. What state is the table in, and what does the previous build do with a half-populated column?
  • How do you verify the backfill actually finished, given rows are still being inserted while it runs?

Design a backend ingestion service that can process real-time GPS coordinates from thousands of active OBD-II

Medium · System Design & Architecture

Design a backend ingestion service that can process real-time GPS coordinates from thousands of active OBD-II car devices.

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Design a notification system that alerts users via the mobile app when their vehicle has been parked in a stre

Medium · System Design & Architecture

Design a notification system that alerts users via the mobile app when their vehicle has been parked in a street-sweeping zone.

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Explain how you would handle API versioning and backward compatibility for mobile clients in a microservices a

Medium · System Design & Architecture

Explain how you would handle API versioning and backward compatibility for mobile clients in a microservices architecture.

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

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

Built from the rounds and topics Metromile candidates report.

Day 1 — Map the Metromile loop

  • Write out the reported sequence: Recruiter Screen, Hiring Manager Chat, Technical Phone Screen, Onsite Interview, Senior Leadership Conversation.
  • For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.

Deliverable: A one-page map of the 5 reported rounds, with the weakest marked.

Day 2 — Work JavaScript

  • Spend the session on JavaScript, which Metromile candidates report being tested on.
  • Write one worked example in JavaScript and time yourself on it.

Deliverable: One timed worked example in JavaScript.

Day 3 — Work Problem solving (coding exercises)

  • Spend the session on Problem solving (coding exercises), which Metromile candidates report being tested on.
  • Write one worked example in Problem solving (coding exercises) and time yourself on it.

Deliverable: One timed worked example in Problem solving (coding exercises).

Day 4 — Work Data Structures & Algorithms (DSA)

  • Spend the session on Data Structures & Algorithms (DSA), which Metromile candidates report being tested on.
  • Write one worked example in Data Structures & Algorithms (DSA) and time yourself on it.

Deliverable: One timed worked example in Data Structures & Algorithms (DSA).

Day 5 — Answer out loud: Coding & Algorithms

  • Answer aloud, timed: Write a program to count the number of occurrences of a specific word in a book, and discuss how you would optimize it for very large texts.
  • Answer aloud, timed: Implement a solution to reverse a linked list or manipulate strings without using built-in high-level library functions.

Deliverable: Spoken answers to 2 reported Coding & Algorithms question(s), under time.

Day 6 — Answer out loud: System Design & Architecture

  • Answer aloud, timed: Design a backend ingestion service that can process real-time GPS coordinates from thousands of active OBD-II car devices.
  • Answer aloud, timed: How would you structure a database schema to support fast queries for historical trip data while minimizing storage costs?

Deliverable: Spoken answers to 2 reported System Design & Architecture question(s), under time.

Day 7 — Answer out loud: Behavioral & Experience

  • Answer aloud, timed: Walk me through a complex project on your resume, explaining the technical trade-offs you had to make and why.
  • Answer aloud, timed: Tell me about a time you had a strong technical disagreement with a senior team member or architect. How did you handle it?

Deliverable: Spoken answers to 2 reported Behavioral & Experience question(s), under time.

Behavioural preparation

Behavioural rounds judge the decision you made and what it cost.

Walk me through a complex project on your resume, explaining the technical trade-offs you had to make and why.

Medium · Behavioral & Experience

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Tell me about a time you had a strong technical disagreement with a senior team member or architect. How did y

Medium · Behavioral & Experience

Tell me about a time you had a strong technical disagreement with a senior team member or architect. How did you handle it?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Describe a situation where you had to work with vague or rapidly changing product requirements. What steps did

Medium · Behavioral & Experience

Describe a situation where you had to work with vague or rapidly changing product requirements. What steps did you take to ensure successful delivery?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

How do you approach mentoring junior engineers or helping your teammates ramp up on a new technology stack?

Medium · Behavioral & Experience

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?