ParentFull threadantoaravinth·Your using two stacks now. This is the solution that I had told but your not satisfying the condition w.r.t to space , its O(n) not O(1).View on HN