討論串[閒聊] 每日leetcode
共 1554 篇文章
內容預覽:
解法思路 :. 照著題目要求的做. 欸欸我leetcode point 2400了欸. 這個要換什麼比較好. 有人有換過東西嗎. 好像可以炫耀欸. class Solution {. public:. int countStudents(vector<int>& students, vector<i
(還有1074個字)
內容預覽:
https://leetcode.com/problems/number-of-students-unable-to-eat-lunch. 1700. Number of Students Unable to Eat Lunch. 齁樓提供PM跟MC兩種貼貼 分別用0跟1表示. 全部齁粉站在一que
(還有2242個字)
內容預覽:
對於任意位置的. )左邊的( 加 * 要比 )多. ( 右邊的 )加 * 要比( 多. 也就是都要有得配對的意思. 從左右各數過來就好. class Solution {. public:. bool checkValidString(string s) {. for(int i = 0, l =
(還有617個字)
內容預覽:
題目:. ( ) 匹配問題. 只是多了一個*可以變成( )或是空的東西. 直接舉例. (***. *()*. (***). 都是合法的. 解法:. 先把右括號通通弄掉. 然後剩下的左掛號跟*號用index來比. 有剩的話就不行. 然後我原本想試試看. 用deque代替star的vector. 結果寫
(還有1875個字)
內容預覽:
想法差不多. 但我一開始最後面只判斷個數沒檢查index. (就是直接return star.Count>=left.Count). 想說為什麼都過不了. 修正之後就過了. 大神好強. C# code:. public class Solution {. public bool CheckValid
(還有782個字)