花費 7 ms
Leetcode: Reconstruct Itinerary

refer to Recursion https://leetcode.com/discuss/84702/share-my-solution and Iteration https: ...

Mon Feb 08 20:29:00 CST 2016 0 3695
LeetCode 1057. Campus Bikes

直接根據最短distance greedy做。 用了優先隊列,C++ less<type> 是大的先,所以我們可以重載<符號,把邏輯反過來。 第二種寫法不用結 ...

Thu Sep 05 20:05:00 CST 2019 0 685
LeetCode 1057. Campus Bikes

原題鏈接在這里:https://leetcode.com/problems/campus-bikes/ 題目: On a campus represented as a 2D grid, ther ...

Thu Jan 16 21:20:00 CST 2020 0 1162
Leetcode: Create Maximum Number

We can use greedy method to solve this. num1 can take charge of i(0<=i<=k) numbers and ...

Sat Jan 02 18:17:00 CST 2016 0 2686
[LintCode] Minimum Spanning Tree

Given a list of Connections, which is the Connection class (the city name at both ends of the ...

Wed Sep 27 20:55:00 CST 2017 0 1284

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM