Applied Intuition Interview Question

Sorting based coding algorithm problem related to AV stack