Count Valid Sequences
Asked at OpenAI · Coding Questions · Difficulty: Medium
Given `n` and a list of pairs of numbers that are forbidden to be in the same sequence, provide the number of possible sub-sequences (of any size) with consecutive numbers from `1` to `n`.
Loading the problem…
More OpenAI interview questions
- Classifier Analysis
- Clean Noisy Human Labels by Scoring Annotator Reliability
- Two-Team Turn-Based Battle Simulator
- Backward Pass of a Row-Sharded MLP with all_gather
- Transformer Fundamentals: Attention, Positions and Normalization
- Debug a Mini GPT and Add a KV Cache