+ 1

Stack in c++ header vs stack usinh linked list

stack header is already available as below: #include <stack> int main() { stack<int> s; s.push(1); cout<< s.top(); } why we are implementing again using linked list or array?

3rd Oct 2019, 4:28 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
3 Answers
0
that is correct... does both give same optimisation? which should be used? it's mere for understanding purpose and one can directly go with stack header ?
3rd Oct 2019, 4:52 PM
Ketan Lalcheta
Ketan Lalcheta - avatar