Some not great programming again here but go it done...
Create hash map of orders with vector of corresponding values.
Iterate through updates verifying that all values to the right of current value are in the "allowed values" vector in the hash map.
Find all invalid updates, perform bubble sort based on the hash map used previously.
Replace value with the value directly ahead of it in the vector if it belongs to it's associated values in the hash map.