討論串[閒聊] 每日LeetCode
共 719 篇文章
內容預覽:
你版今天線蟲帥朝都去FF惹. 剩我還在解每日leetcode,今天還是hard,我要吐了. 2092. Find All People With Secret. 有0~n-1個人,並且0有一個秘密,他告訴了firstPerson. 有一個array meetings[x,y,time]. 如果x、y
(還有1988個字)
內容預覽:
多用一個mp做dp. 這樣記憶體就不會爆了. 這不算hard太狠了. class Solution {. public:. int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int. dst, int k) {.
(還有844個字)
內容預覽:
我她媽就用了一個map一個queue. 記憶體就爆了. 他這限制也抓太緊. 操機掰哩 還medium. 改一個小時還是改不出來. 明天再看看. ==. 787. Cheapest Flights Within K Stops. class Solution {. public:. int findC
(還有841個字)
內容預覽:
787. Cheapest Flights Within K Stops. 有n個city,要從src飛到dst、k代表你能轉機幾次. 給一個array flights裡面有三個元素[from, to, price]. 代表飛機的起點、終點以及價錢. 請問你最少要花多少錢才能從src到dst. 思路
(還有1813個字)