This problem has two solutions:O(n) push, O(1) pop or O(1) push, O(n) pop


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.