V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  wangpugod2003  ›  全部回复第 5 页 / 共 15 页
回复总数  292
1  2  3  4  5  6  7  8  9  10 ... 15  
316 天前
回复了 loverorser 创建的主题 移民 润计划初步,可行吗?
不需要什么 STEP XX ,从今天就开始学英语。
317 天前
回复了 ZC3746 创建的主题 生活 [记录] 我的加拿大的生活和学习
只要能入境,就成功了一大半了,祝福~
318 天前
回复了 ZC3746 创建的主题 生活 加拿大,今天尝试了送外卖, 10 单≥56.34 刀
LZ 在哪个城市?
323 天前
回复了 lotusp 创建的主题 程序员 当你成为一个 Tech Lead
thoughtworks 今年裁了多少了?貌似应届生全部给裁了?
341 天前
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
@jmk92 这个看起来靠谱,思路是对的。
341 天前
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
不对,大家可以用三个测试用例自己跑下测试下。chatGPT 给出的结果和跑出来的不等。
这个题要用 DP+单调栈去解,确实挺难的。
342 天前
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
@liqinliqin
@wonderfulcxm

2355. Maximum Number of Books You Can Take


You are given a 0-indexed integer array books of length n where books[i] denotes the number of books on the ith shelf of a bookshelf.

You are going to take books from a contiguous section of the bookshelf spanning from l to r where 0 <= l <= r < n. For each index i in the range l <= i < r, you must take strictly fewer books from shelf i than shelf i + 1.

Return the maximum number of books you can take from the bookshelf.



Example 1:

Input: books = [8,5,2,7,9]
Output: 19
Explanation:
- Take 1 book from shelf 1.
- Take 2 books from shelf 2.
- Take 7 books from shelf 3.
- Take 9 books from shelf 4.
You have taken 19 books, so return 19.
It can be proven that 19 is the maximum number of books you can take.
Example 2:

Input: books = [7,0,3,4,5]
Output: 12
Explanation:
- Take 3 books from shelf 2.
- Take 4 books from shelf 3.
- Take 5 books from shelf 4.
You have taken 12 books so return 12.
It can be proven that 12 is the maximum number of books you can take.
Example 3:

Input: books = [8,2,3,7,3,4,0,1,4,3]
Output: 13
Explanation:
- Take 1 book from shelf 0.
- Take 2 books from shelf 1.
- Take 3 books from shelf 2.
- Take 7 books from shelf 3.
You have taken 13 books so return 13.
It can be proven that 13 is the maximum number of books you can take.
348 天前
回复了 tomasyang 创建的主题 生活 上海浦东和浦西的分化会越来越大么?
十年前的上海同事说的:“我白天在浦东上班,晚上回上海。”
哪个行业的公司啊?今年怎么行情这么不好?
356 天前
回复了 rqxiao 创建的主题 English 有没有程序员英语简历可以参考的
google “software engineer resume template” 不要太多。
357 天前
回复了 imxiaoi 创建的主题 分享发现 记一次怪怪的面试经历
碰到问题 3:“你们用什么 linux”
这种低端问题,建议你直接走人。
有没 trasnfer 的可能?
357 天前
回复了 abvatous 创建的主题 问与答 扫地机器人解惑
都是垃圾,做好只能用个 1-2 年的打算。
363 天前
回复了 7911364440 创建的主题 程序员 问个分布式事务的问题
你这个需求,是保证整个流程,做到消息的 exactly once 处理.
首先需要确认发出去了,每个模块收到了回 ack, 没有就 retry 该模块; 这样保证 > 1; 注意 retry 多次后如果没收到,再到定时任务中设置一段时间后重发,如果再没收到可以放到 dead message queue 中人工处理;
然后每个对端都要 idempotent ,确保收到的消息(maybe > 1)但是只处理 1 次。一般是需要一个 transaction ID 。
@wangkun025 感谢,请问开启了这个不会让入会的其他人看到吧?
2023-05-15 10:09:45 +08:00
回复了 iHaooo 创建的主题 职场话题 [求助] 互联网开发职位与宁波市直事业单位,如何抉择?
按照事业单位的类型,等级,个人性格、家庭所在地和未来的职业规划而定。
1  2  3  4  5  6  7  8  9  10 ... 15  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3096 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms · UTC 05:03 · PVG 13:03 · LAX 22:03 · JFK 01:03
Developed with CodeLauncher
♥ Do have faith in what you're doing.