This video explains a very frequently asked important programming interview question from stack and queue topic which is to design a special stack which supports getmin operation in just O(1) time and O(1) space. This video explains the most optimized approach to find minimum from a stack. The previous video explained it in O(1) time but took O(N) space. The previous approach was much more simple as compared to the current approach but this one is more efficient. LINK to the previous video and CODE LINK for current video is given below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: gist.github.co...
PREVIOUS VIDEO: • Design special stack w...
Негізгі бет Design special stack with getmin in O(1) time time and O(1) space
Пікірлер: 120