Question: You are designing a prioritization algorithm for an online retailer. We receive a stream of user requests each of which has an associated accountId. There
You are designing a prioritization algorithm for an online retailer. We receive a stream of user
requests each of which has an associated accountId. There is a group of accountIds that are
"Big Spenders" and we want to prioritize them into the "High Priority Queue". All other users
are sent to the "Normal Priority Queue". Provide an efficient pseudocode algorithm with two
functions:
Insert: when given a user, choose the appropriate queue to send them to
Poll: when a representative becomes available, get the next user high priority should always
be prioritized
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
