Gainsight interview question

revese a stack without using extra space