摘要:
https://leetcode.com/problems/longest-well-performing-interval/ 将满足条件的视为+1,不满足的视为-1,计算前缀和。该题可以转换为计算和大于0的最小区间。 class Solution { public: int longestWPI( 阅读全文
摘要:
problem: https://leetcode.com/problems/robot-bounded-in-circle/ As the hint mentions, we can keep track of the robot's position, when it finally retur 阅读全文
摘要:
problem: https://leetcode.com/problems/advantage-shuffle/ In ordered to maximize the advantage of array A with respect to B, we had better choose the 阅读全文