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 minSecurity Engineer

Threat Policy State Compression

Security Engineer signal: bitmask DP + state compression in a threat intel graph context. This is a ProdMatch-owned security engineer drill, framed as a May 2026 Chargebee Security Platform simulation, not a copied platform question.

Company context

Chargebee · Security Platform

Freshness

May 2026

Product surface

threat intel graph

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

Question

For threat intel graph, each indicators 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

  • attack graphs
  • policy tries
  • anomaly detection
  • 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

Attack Policy State CompressionhardPolicy Policy State CompressionhardAnomaly Policy State Compressionmedium