![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Leetcode
leetcode
Nick Blog
这个作者很懒,什么都没留下…
展开
-
876. Middle of the Linked List (python)
1. 题目描述 English: Given a non-empty, singly linked list with head node head, return a middle node of linked list. If there are two middle nodes, return the second middle node. 中文: 给定一个带有头节点的非空单链表head,返回链表的中间节点。 如果有两个中间节点,则返回第二个中间节点。 Example: Input: [1,2,3,4原创 2020-05-19 21:23:04 · 200 阅读 · 0 评论 -
136. Single Number (python)
1. 题目描述 English: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? 中文: 对于一个非空的整数数组,每个元素都会出原创 2020-05-10 23:34:21 · 253 阅读 · 0 评论 -
122. Best Time to Buy and Sell Stock II (python)
1. 题目描述 English: Say you have an array prices for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock原创 2020-05-10 19:54:42 · 245 阅读 · 0 评论 -
64. Minimum Path Sum (python)
1. 题目描述 English: 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 any point in time. 中文: 给定一个m*n的非负整型数组,找见从原创 2020-05-10 17:47:44 · 277 阅读 · 0 评论 -
55. Jump Game (python)
1. 题目描述 English: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. 中文: 给原创 2020-05-10 15:39:09 · 245 阅读 · 0 评论 -
53. Maximum Subarray (python)
1. 题目描述 English: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. 中文: 给定一个整数数组,找到和最大的连续子数组(长度至少是1),并返回其和。 Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanation原创 2020-05-08 23:58:00 · 346 阅读 · 0 评论 -
33. Search in Rotated Sorted Array (python)
1. 题目描述 English:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to sear...原创 2020-05-07 23:36:43 · 178 阅读 · 0 评论 -
49. Group Anagrams (python)
1. 题目描述 English:Given an array of strings, group anagrams together. 中文:给定一个字符串数组,将组成字符相同的字符串聚类。 Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], ["nat","t...原创 2020-05-07 22:50:00 · 355 阅读 · 0 评论