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
Bit Manipulationhard70 minAI/ML Engineer

GraphRAG Policy State Compression

AI/ML Engineer signal: bitmask DP + state compression in a knowledge graph RAG context. This is a ProdMatch-owned ai ml engineer drill, framed as a May 2026 Razorpay AI Search simulation, not a copied platform question.

Company context

Razorpay · AI Search

Freshness

May 2026

Product surface

knowledge graph RAG

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

Question

For knowledge graph RAG, each entities requires a subset of capabilities. Choose the smallest team of services covering all required capabilities; tie-break by lowest total risk.

Input

  • m capabilities and services with capability masks plus risk.

Output

  • Minimum service count and risk, or impossible.

Constraints

  • 1 <= m <= 22
  • 1 <= services.length <= 2000
  • Capability sets may overlap heavily.

Concepts

  • vector search
  • RAG retrieval
  • recommendation graphs
  • bitmask DP
  • state compression
  • subset enumeration

required={A,B,C}, services=[AB risk 4, C risk 1] -> count=2, risk=5

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

  • Do not shift beyond the integer width in fixed-width languages.
  • Keep feature-to-bit mapping stable.

Next Similar Problems

Vector Policy State CompressionhardRecommend Policy State CompressionmediumBatching Policy State Compressionhard