Two Stack Problem Leetcode Sql Server