未完结
vancooler
cs学徒/天天偷看大牛的博客/SDU
展开
-
pip 换源记录
简单的临时换一下:pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com来源:https://www.cnblogs.com/hjbf/p/10645347.html永久改一下:https://blog.csdn.net/innocent_cat/article/details/90481199?utm_medium=distribute.pc_relevant.none-ta.原创 2020-07-09 10:50:35 · 133 阅读 · 0 评论 -
9.28 练手 腾讯50题 9.回文数 43.字符串数字相乘
Leetcode 9.Palindrome Number思路是先转换成字符串然后两边双指针检测,代码如下:class Solution(object): def isPalindrome(self, x): """ :type x: int :rtype: bool """ if x<0: ...原创 2019-09-28 20:24:13 · 102 阅读 · 0 评论 -
9.26 练手 腾讯50题 8.atoi
Leetcode 8.String to Integer (atoi)如何将字符串转为有效数字题,代码如下:class Solution(object): def myAtoi(self, str): """ :type str: str :rtype: int """ if str == None...原创 2019-09-26 22:08:39 · 117 阅读 · 0 评论 -
9.22 练手 腾讯50题 160 寻找两链表交点
Leetcode160.Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:begin to...原创 2019-09-22 22:09:01 · 87 阅读 · 0 评论 -
9.17 练手 腾讯50题 61旋转链表
Leetcode61.Rotate ListGiven a linkedlist, rotate the list to the right bykplaces, wherekis non-negative.Example 1:Input: 1->2->3->4->5->NULL, k = 2Output: 4->5->1-...原创 2019-09-17 00:29:41 · 88 阅读 · 0 评论 -
9.11 练手 腾讯50题 121
Leetcode121.Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction ...原创 2019-09-12 08:39:41 · 117 阅读 · 0 评论 -
9.10 练手 88
Leetcode 88.Merge Sorted ArrayGiven two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:The number of elements initialized innums1andnums2aremandn...原创 2019-09-10 23:16:20 · 82 阅读 · 0 评论 -
9.8 练手 腾讯50题 59螺旋矩阵2
Leetcode 59.Spiral Matrix IIGiven a positive integern, generate a square matrix filled with elements from 1 ton2in spiral order.Example:Input: 3Output:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7,...原创 2019-09-08 18:18:38 · 72 阅读 · 0 评论 -
9.7 练手 腾讯50题 54螺旋矩阵
Leecode54.Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.Example 1:Input:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]O...原创 2019-09-07 20:09:19 · 86 阅读 · 0 评论 -
9.4 练手 腾讯50题 3Sum
Leetcode15.3SumGiven an arraynumsofnintegers, are there elementsa,b,cinnumssuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:The solutio...原创 2019-09-04 18:08:49 · 58 阅读 · 0 评论 -
9.3练手 腾讯50题 16最接近三数和
Leetcode16.3Sum ClosestGiven an arraynumsofnintegers and an integertarget, find three integers innumssuch that the sum is closest totarget. Return the sum of the three integers. You may a...原创 2019-09-03 20:25:06 · 80 阅读 · 0 评论 -
8.31 练手 腾讯50题 643
Leetcode643.Maximum Average Subarray IGiven an array consisting ofnintegers, find the contiguous subarray of given lengthkthat has the maximum average value. And you need to output the maximum ...原创 2019-08-31 22:43:33 · 63 阅读 · 0 评论 -
8.29 练手 腾讯50题 4
Leetcode4.Median of Two Sorted ArraysThere are two sorted arraysnums1andnums2of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be...原创 2019-08-29 18:54:56 · 82 阅读 · 0 评论