关闭

64. Minimum Path Sum(优化)

题目Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at an...
阅读(5) 评论(0)

64. Minimum Path Sum

题目Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at an...
阅读(98) 评论(0)

63. Unique Paths II

上一个题目的完整解题思路: http://blog.csdn.net/daigualu/article/details/76018298Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle...
阅读(122) 评论(0)

62. Unique Paths

题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the bot...
阅读(119) 评论(0)

40. Combination Sum II

题目Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in the combination....
阅读(319) 评论(0)

39. Combination Sum

题目Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from...
阅读(112) 评论(0)

25. Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of...
阅读(143) 评论(1)

22. Generate Parentheses

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()", "()(())", "...
阅读(164) 评论(0)

24. Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may n...
阅读(171) 评论(0)

23. Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.归并排序思想 K个分成2个listNode的合并方法; 二等分,每一份返回合并后的一个ListNode; 合并这两个。 Code/** * Definition for singly-linked lis...
阅读(146) 评论(0)

Python-一个因浅复制和深复制引起的bug

通过一个leetcode的题目认识了解注意下python的深复制和浅复制问题。...
阅读(286) 评论(1)

347.Top K Frequent Elements-Python

Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ? k ? number of unique eleme...
阅读(213) 评论(0)

347. Top K Frequent Elements

Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ? k ? number of unique eleme...
阅读(58) 评论(0)

215. Kth Largest Element in an Array-Python

利用Python最大堆解决问题。Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Given [3,2,1,5,6,4] and k = 2,...
阅读(274) 评论(1)

461. Hamming Distance-Python

The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x, y < 2^31....
阅读(231) 评论(1)

斯坦福大学-大数据与数据挖掘学习资料

1 斯坦福数据挖掘 http://mmds.org/ 截图: 2 厦门大学数据库实验室 http://dblab.xmu.edu.cn/...
阅读(55) 评论(0)

26. Remove Duplicates from Sorted Array-Python

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with cons...
阅读(40) 评论(0)

21. Merge Two Sorted Lists-Python

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路 递归最容易实现,根据l1和l2的头元素大小,决定头元素的指向,这样问题的规模减1,递归直到满足其中的3个返回条件...
阅读(326) 评论(2)

19. Remove Nth Node From End of List-python

原题 Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked l...
阅读(314) 评论(0)

python所有的内置模块官方索引

python所有的内置模块官方索引地址:https://docs.python.org/3/py-modindex.html...
阅读(60) 评论(0)
24条 共2页1 2 下一页 尾页
    Leetcode Solutions in Github

    Click me

    Leetcode solutions in Github, including tags: Array, HashTable, Stack, Queue, LinkedList, Tree, Graph,...

    leetcode-manager

    Click me

    Current Leetcode manager: it's used by Entity Framework, WinForms, Sql Server to manage leetcode questions that we have done. Functions include tags creation, revise and deletion, and questions creation, edit and deletion.

    个人资料
    • 访问:82931次
    • 积分:4105
    • 等级:
    • 排名:第7428名
    • 原创:261篇
    • 转载:0篇
    • 译文:0篇
    • 评论:54条
    博客专栏