Alice52 / algorithms

This repository is for learning Algorithms.
https://programmercarl.com/
0 stars 0 forks source link

[daily] 2021-09-20 #188

Closed Alice52 closed 3 years ago

Alice52 commented 3 years ago
  1. reference

  2. discription

      1. 有效的括号
  3. core

    • Stack 存入pair元素

  1. reference

  2. discription

      1. 删除字符串中的所有相邻重复项
  3. core

    • Stack
    • || StringBuilder
    • || char 数组 + 双指针{相等是回退一位+不相同的元素移到头部}

  1. reference
  2. discription
      1. 下一个更大元素 I
  3. core

    • 单调栈: for + while
    • 元素则 倒序
    • 下标则正序 + pair

  1. reference
  2. discription
    • 单调队列
  3. core

    • push: 删除比自己小的
    • pop(int n): n 是第一个{最大的则移除}
    • 模拟过程

  1. reference
  2. discription
      1. 逆波兰表达式求值
  3. core

    • stack
    • || 使用数组模拟 stack