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
Arrays & Hashingmedium45 minSecurity Engineer

Policy Duplicate Signal Resolver

Security Engineer signal: hash map + dedupe in a authorization policy engine context. This is a ProdMatch-owned security engineer drill, framed as a March 2026 Freshworks Identity simulation, not a copied platform question.

Company context

Freshworks · Identity

Freshness

March 2026

Product surface

authorization policy engine

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

Question

For authorization policy engine, collapse duplicate rules by external ID. Keep the newest event per ID and return IDs in first-seen order.

Input

  • Array of events {id, version}.

Output

  • Deduped IDs and their kept version.

Constraints

  • 1 <= events.length <= 200000
  • Versions are comparable integers.

Concepts

  • attack graphs
  • policy tries
  • anomaly detection
  • hash map
  • dedupe
  • stable ordering

[(a,1),(b,1),(a,3)] -> [(a,3),(b,1)]

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 sort if first-seen order is required.
  • Treat duplicate IDs with equal versions deterministically.

Next Similar Problems

Attack Duplicate Signal ResolvereasyAnomaly Duplicate Signal ResolvereasySecrets Duplicate Signal Resolvereasy