leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

LeetCode题解,151道题完整版。广告:推荐刷题网站 https://www.lintcode.com/?utm_source=soulmachine

Results 51 leetcode issues
Sort by recently updated
recently updated
newest added

Time limit exceeded. linear solution: https://oj.leetcode.com/discuss/20176/concise-in-place-solution-with-linear-time Binary search: https://oj.leetcode.com/discuss/19000/c-my-binary-search-solution

https://github.com/soulmachine/leetcode/blob/master/C%2B%2B/chapString.tex#L402 the iteration direction for inner loop is not correct and should be for (int j = i - 1; j >= 0 ; j--) {

P44页讲到了Remove Duplicates from Sorted List的迭代解法,其中的一段代码片段: ``` c for (ListNode *prev = head, *cur = head->next; cur; cur = cur->next) { if (prev->val == cur->val) { prev->next = cur->next; delete cur;...

Leetcode has added the new case for this problem, when overflow occurs, need to return INT_MAX, the current code can NOT be accepted. I adjust the return code as this...

请问懒人镜像版的root密码是什么啊?

ListNode* swapPairs(ListNode *head) { if(head == NULL || head->next == NULL) return head; ListNode *next = head->next; ListNode *temp = next->next; next->next = head; head->next = swapPairs(temp); return next; }

OJ没法通过, 如果linked list: 1->NULL or 1->1-> NULL

The test set also includes the non-alphabet characters, thus the ASCII_MAX should be defined as 256, and s[i] - 'a' is not necessary. The current code can not pass the...

The input string could contain characters other than a-z. So we need to change the size of last array from 26 to 256.

Hi, Your solution don't take care this case: '+-1'. I am working on python solutions. I will submit a pr for this after I finish my work(weeks later). This is...