C++ - How to find smallest node/element in stack (O(1) time

后端 未结 0 1471
刺人心
刺人心 2020-12-11 03:35

I need to find the smallest value in stack but in constant time, so beacuse of that I can not use "for" loop or "while". I will provide you the code now,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题