Stock span problem
Techdose
0:00 / 0:00
Stock span problem
51 515 просмотров · 6 лет назад
Techdose
198 тыс. подписчиков
51 515 просмотров · 6 лет назад
This video explains the stock span problem in the simplest way possible. First i have explained the intuitive approach of solving using bruteforce in O(N2) time and then i have shown the intuition behind efficient approach and solved it using stack in just O(N) time. The CODE LINK for the efficient approach 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: https://gist.github.com/SuryaPratapK/...