Queue Reversal Leetcode Practice Sql