Describe a time when you used domain knowledge first, then went hands on with coding to deliver a solution.
Answer with a concrete example, explaining how domain rules shaped your algorithm and implementation choices. For the coding portion, implement the generalized operation below.
Given items and an ordered priority list, return items grouped by priority order. Values absent from priority must appear afterward, preserving their original relative order.
Signature: apply_domain_priority(items, priority)
Inputs and output are lists of strings.
def apply_domain_priority(items, priority):