Find Active Signers From Envelope Routing Order Groups
Last updated: November 29, 2026
Quick Overview
Given an envelope's recipients as (recipient_id, routing_order) pairs and the set of recipients who have already completed, return the recipients who should currently be able to act. Recipients sharing a routing order sign in parallel; a higher order unlocks only when every lower order is done.
DocuSign
November 29, 20260
0
0 solved
Given an envelope's recipients as (recipient_id, routing_order) pairs and the set of recipients who have already completed, return the recipients who should currently be able to act. Recipients sharing a routing order sign in parallel; a higher order unlocks only when every lower order is done.
A warm-up in the style of a DocuSign phone screen, built on the eSignature routing model where signers with the same routing order act in parallel and the next group waits. The interviewer checks that you model the rule precisely, handle the finished-envelope case, and write clean code before the harder follow-ups.
What the Interviewer Expects
- Restate the routing rule: the active group is the lowest routing order that still has an incomplete recipient
- Group pending recipients by routing order in one pass
- Return a deterministic order (sorted ids) so callers and tests are stable
- Return an empty list when everything is complete, and say what that means for the envelope state
- State O(n) time, or O(n log n) with sorting
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you support skipped routing orders, for example orders 1, 3, 7 with no 2?
- A recipient declines: how should the function and the envelope state change?
- Carbon-copy recipients never act but receive the document when their order is reached. How do you fit them in?
- How would you make this incremental when one recipient completes, instead of rescanning?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: a list of (recipient_id, routing_order) and a set of completed ids. Output: the ids allowed to act right now. Rule: the smallest routing order that has at least one incomplete recipient is th...
High-Level Design
Make one pass, keeping only pending recipients, bucketed by routing order in a dict. The answer is the bucket with the minimum key. There is no need to sort all orders; min over the keys is enough. ...