摘要: 1 题目 Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. I 阅读全文
posted @ 2023-12-26 07:24 酷酷- 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1 小技巧 // 数字 char 怎么得到它的 int char c = '5'; int num = c - '0' + 1; 2 思想 2.1 给定数的下一个接近的数 比如 241532 的下一个数 242135,主要是思想,从右往左找到第一个出现降序的,找到 15,然后从右边找到第一个比 1 阅读全文
posted @ 2023-12-26 07:20 酷酷- 阅读(5) 评论(0) 推荐(0) 编辑