Priority Index
Build a priority index that maps individual codes to their priority levels. Your team maintains an internal incident management tool that groups alert codes by priority level.

- priority_index.rb
- priority_index_test.rb
The full README and the hidden test suite are available once you open the byte in your CodeSubmit workspace. Candidates never see the hidden tests.
Standard engineering judgment. Multiple edge cases worth handling.
More Ruby bytes

Manage badge factory settings. When an access badge is issued, it starts out unnamed.

Your team maintains an internal alert triage service. Each incoming alert carries five severity tags — tokens composed of a level indicator and a category code (e.g. 4S 5H 7C 8D JC). The ranking rules for these tag sets follow standard poker hand rankings.

An online retailer sells five distinct product SKUs. Each item costs $8 at full price. To encourage bundle purchases, the retailer offers tiered discounts when a customer buys distinct items together:

You are building a decoder for a legacy industrial robot controller. The controller receives a continuous stream of 3-character instruction codes. Each triplet maps to a named operation. When a HALT code is encountered, execution stops immediately.

You are cleaning imported contact records before they are saved into a CRM. Each record includes a freeform phone field entered by a human, so the data can contain spaces, dots, parentheses, hyphens, and an optional leading country code of 1.

Classify a delivery drop-off location into the correct fee tier based on its distance from the warehouse.