出栈总次数

image
,其中cnt就是我们要求的总次数,而n是指一个栈中存在几个数。

posted @ 2022-05-28 13:59  ggexs  阅读(28)  评论(0)    收藏  举报