Find orphan orders
Your task
Before importing a sales backup, you must check referential integrity. orders rows look like "order_id,customer_id" (order ids are distinct); customers rows look like "customer_id,name". An order is an orphan when its customer_id matches no customer row. Return the orphan order ids sorted ascending (plain string order). Example: orders ["o1,c1", "o2,c9", "o3,c2"] with customers ["c1,ava", "c2,raj"] give ["o2"].
Examples
orphan_orders(orders: list[str], customers: list[str]) -> list[str]Example 1
Input
orphan_orders(["o1,c1", "o2,c9", "o3,c2"], ["c1,ava", "c2,raj"])Output
["o2"]