摘要:
class Solution {private: static int compare(const Interval& a, const Interval& b) { return a.start merge(vector &intervals) { vector... 阅读全文
摘要:
class Solution {public: ListNode *mergeKLists(vector &lists) { ListNode* merged = NULL; for (int i=0; ival val) { n... 阅读全文
摘要:
Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas... 阅读全文
摘要:
class Solution {public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { ListNode* p = l1; ListNode* q = l2; ListNode* he... 阅读全文
摘要:
class Solution {public: string getPermutation(int n, int k) { k--; if (n nums(n, 0); long seg = 1; for (int i=0; i= se... 阅读全文
摘要:
class Solution {public: int climbStairs(int n) { if (n < 1) return 0; int a = 0; int b = 1; for (int i=0; i<n; i++) { ... 阅读全文