討論串[閒聊] 每日leetcode
共 1548 篇文章
內容預覽:
3346.. 好感動. 去年的我一整排wa. 今年的我ac了><. 當meeting room 在寫. 看起來是可以不用開map比較快ㄛ. class Solution {. public:. int maxFrequency(vector<int>& nums, int k, int op) {.
(還有768個字)
內容預覽:
非常好題目. 很適合當作leetcode入門題. 一二三四五. def finalValueAfterOperations(self, operations: List[str]) -> int:. rets = 0. for op in operations:. if op=='++X' or o
(還有21個字)
內容預覽:
真的是媽的幹題. 到底在供三小. 一定要wa靠testcase才知道他到底想幹嘛==. 對抗AI的方法就是. 用人也看不懂的說法改寫水題. 我要你用一種沒有人知道的話來說. class Solution {. public:. int findSmallestInteger(vector<int>&
(還有324個字)
內容預覽:
2598. Smallest Missing Non-negative Integer After Operations. 這題完全看不懂題目到底在說三小. leetcode的題目敘述能不能加強點阿. 思路 :. 統計所有nums裡面的數除以value後的餘數. 找出出現最少的餘數, 如果有複數個就
(還有696個字)
內容預覽:
好久沒有在早上寫了. 先取餘數再count. 然後看看哪個餘數的count最小 坑就會在那邊. 找到那個坑即可. def findSmallestInteger(self, nums: List[int], value: int) -> int:. res_cnt = [0]*value. for
(還有145個字)