未完结
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.youkuaiyun.com/innocent_cat/article/details/90481199?utm_medium=distribute.pc_relevant.none-ta.原创 2020-07-09 10:50:35 · 182 阅读 · 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 · 157 阅读 · 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 · 176 阅读 · 0 评论 -
9.22 练手 腾讯50题 160 寻找两链表交点
Leetcode160.Intersection of Two Linked Lists Write 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 · 137 阅读 · 0 评论 -
9.17 练手 腾讯50题 61旋转链表
Leetcode61.Rotate List Given a linkedlist, rotate the list to the right bykplaces, wherekis non-negative. Example 1: Input: 1->2->3->4->5->NULL, k = 2 Output: 4->5->1-...原创 2019-09-17 00:29:41 · 130 阅读 · 0 评论 -
9.11 练手 腾讯50题 121
Leetcode121.Best Time to Buy and Sell Stock Say 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 · 200 阅读 · 0 评论 -
9.10 练手 88
Leetcode 88.Merge Sorted Array Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array. Note: The number of elements initialized innums1andnums2aremandn...原创 2019-09-10 23:16:20 · 126 阅读 · 0 评论 -
9.8 练手 腾讯50题 59螺旋矩阵2
Leetcode 59.Spiral Matrix II Given a positive integern, generate a square matrix filled with elements from 1 ton2in spiral order. Example: Input: 3 Output: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7,...原创 2019-09-08 18:18:38 · 104 阅读 · 0 评论 -
9.7 练手 腾讯50题 54螺旋矩阵
Leecode54.Spiral Matrix Given 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 · 126 阅读 · 0 评论 -
9.4 练手 腾讯50题 3Sum
Leetcode15.3Sum Given 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 · 101 阅读 · 0 评论 -
9.3练手 腾讯50题 16最接近三数和
Leetcode16.3Sum Closest Given 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 · 129 阅读 · 0 评论 -
8.31 练手 腾讯50题 643
Leetcode643.Maximum Average Subarray I Given 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 · 103 阅读 · 0 评论 -
8.29 练手 腾讯50题 4
Leetcode4.Median of Two Sorted Arrays There 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 · 132 阅读 · 0 评论
分享