ProdMatch
CompaniesCitiesRolesSign in

Companies

  • Google
  • Microsoft
  • Meta
  • Amazon
  • Apple
  • Atlassian
  • Nvidia
  • Oracle
  • See all 51 →

Cities

  • Bengaluru jobs
  • Hyderabad jobs
  • Pune jobs
  • Gurugram jobs
  • Noida jobs
  • Delhi NCR jobs
  • Mumbai jobs
  • Chennai jobs
  • Remote-India jobs

Roles

  • QA / SDET Engineers
  • Backend Engineers
  • Frontend Engineers
  • Full-stack Engineers
  • Data Analysts
  • Data Engineers
  • ML / AI Engineers
  • DevOps / SRE Engineers
  • All roles →

ProdMatch

  • About
  • Career guides
  • Compare
  • Salaries
  • Skills
  • DSA practice
  • Privacy
  • Terms
  • Sign in

© 2026 ProdMatch.ai · Built for India · DPDP Act 2023 compliant · Job data sourced from official company career pages.

Back to DSA
Trieshard70 minAI/ML Engineer

Features Prefix Intent Index

AI/ML Engineer signal: trie + prefix counts in a feature store freshness context. This is a ProdMatch-owned ai ml engineer drill, framed as a April 2026 Ola ML Platform simulation, not a copied platform question.

Company context

Ola · ML Platform

Freshness

April 2026

Product surface

feature store freshness

ProdMatch interview simulation based on product-team patterns; not a claim of a real company question.

Question

Build a prefix index for feature store freshness. Support insert(term, weight), delete(term), and topPrefix(prefix) returning the best active term by weight then lexicographic order.

Input

  • A sequence of index operations.

Output

  • Return values for topPrefix operations.

Constraints

  • 1 <= operations <= 200000
  • Total characters <= 1000000
  • Weights can change through reinsertion.

Concepts

  • vector search
  • RAG retrieval
  • recommendation graphs
  • trie
  • prefix counts
  • autocomplete

insert pay 5, insert payout 7, topPrefix pa -> payout

Approach

Try framing your own approach first. The 30 seconds you think before peeking is where learning happens.

Clean Solution

Reveal the approach first.

How well did you understand?

Your rating tunes when this problem shows up again.

Common Mistakes

  • Deletion is hard if nodes cache best child; use lazy invalidation or per-node heap when deletes are frequent.
  • Tie-break lexicographically for deterministic output.

Next Similar Problems

Vector Prefix Intent IndexhardGraphRAG Prefix Intent IndexmediumRecommend Prefix Intent Indexmedium