自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 网易2018实习生招聘笔试题-C++开发实习生算法题

[编程题] 被3整除时间限制:1秒空间限制:32768K小Q得到一个神奇的数列: 1, 12, 123,...12345678910,1234567891011...。并且小Q对于能否被3整除这个性质很感兴趣。小Q现在希望你能帮他计算一下从数列的第l个到第r个(包含端点)有多少个数可以被3整除。输入描述:输入包括两个整数l和r(1 <= l <= r <= ...

2018-10-31 19:36:16 542

原创 leetcode 141 Linked List Cycle

python:class Solution(object): def hasCycle(self, head): """ :type head: ListNode :rtype: bool """ if not head: return False ...

2018-10-29 11:05:28 169

原创 leetcode 155 Min Stack

python:class MinStack: def __init__(self): """ initialize your data structure here. """ self.stack = [] def push(self, x): """ :ty...

2018-10-25 09:39:17 212

原创 leetcode 637 Average of Levels in Binary Tree

python:class Solution: def averageOfLevels(self, root): """ :type root: TreeNode :rtype: List[float] """ if root is None: return [] r...

2018-10-24 11:10:35 226

原创 819 Most Common Word

python;class Solution: def mostCommonWord(self, paragraph, banned): """ :type paragraph: str :type banned: List[str] :rtype: str """ res = ('', -...

2018-10-23 16:49:32 272

原创 733 Flood Fill

python:class Solution: def floodFill(self, image, sr, sc, newColor): """ :type image: List[List[int]] :type sr: int :type sc: int :type newColor: int ...

2018-10-17 16:52:43 265

原创 vs 2017 配置 openCV 3.4.3

1. 从官网https://www.opencv.org/releases.html下载 windows版 opencv3.4.3 并安装 ,这个过程很简单。2. 在系统环境变量Path中添加如下环境变量。3. 打开 vs2017 新建一个空项目,然后Ctrl+Shift+a添加一个c++文件。4. 进入视图→其他窗口→属性管理器,打开Debug|x64,选择添加新项目属性...

2018-10-09 15:59:18 1746

原创 leetcode 257 Binary Tree Paths

python:class Solution(object): def binaryTreePaths(self, root): """ :type root: TreeNode :rtype: List[str] """ path = '' res = [] self.Tr...

2018-10-08 10:08:15 189

原创 leetcode 739 Daily Temperatures

python:class Solution: def dailyTemperatures(self, temperatures): """ :type temperatures: List[int] :rtype: List[int] """ stack = [[temperatures[0], 0]]...

2018-10-07 21:37:00 198

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除