InterviewDB Question

Chemical Reaction Simulation: Model Chain Reactions and Find Stable End States

Question Details

Problem You are given a list of chemical reaction rules: A + B -> C means combining elements A and B produces C. Given an initial set of elements, simulate the reactions until no more reactions are possible, then return the final stable set. Reactions trigger in any order when the required elements are both present. An element is consumed when it participates in a reaction. Follow-ups The order of reactions can affect the final state (some reactions compete for the same element). How would you d…

Full Details

🔒

Unlock all Hudson River Trading questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a hudson river trading interview during the oa round.

It covers the following topics: Coding, Oa .