博客
关于我
AcWing 828. 模拟栈
阅读量:348 次
发布时间:2019-03-04

本文共 471 字,大约阅读时间需要 1 分钟。

??????????????????????????

  • ???????

    • ???????????????????1000000??????100000????
  • ?????

    • static int tt = 0???????????????0?
    • static int[] st = new int[N];?????????????
  • push???

    • ????x????????st[tt] = x???tt++?
  • pop???

    • ??tt > 0?????????????tt--??????????
  • empty???

    • ??tt > 0????????????NO??????YES?
  • query???

    • ???????????????st[tt]?????-1?
  • ???????

    • ??M????????????
    • ??empty?query????????????????????
  • ??????

    • ???????????????
    • ????????????????????
  • ???????????????????????????????????????????

    转载地址:http://okre.baihongyu.com/

    你可能感兴趣的文章
    php echo 输出 锘?... 乱码问题
    查看>>
    PHP empty、isset、isnull的区别
    查看>>
    ReferenceQueue的使用
    查看>>
    PHP FastCGI进程管理器PHP-FPM的架构
    查看>>
    referenceQueue用法
    查看>>
    Springboot处理跨域的方式(附Demo)
    查看>>
    php flush()刷新不能输出缓冲的原因分析
    查看>>
    Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig
    查看>>
    Refactoring-Imporving the Design of Exsiting Code — 代码的坏味道
    查看>>
    PHP imap 远程命令执行漏洞复现(CVE-2018-19518)
    查看>>
    php include和require
    查看>>
    ref 和out 区别
    查看>>
    php JS 导出表格特殊处理
    查看>>