自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 LeetCode Search a 2D Matrix I,II,III (74,240)

今天面了百度,我确实目前没有这个实力,但是被拒了人总是很难受的 看以后吧 这是今天百度面的两道算法题,一搜,LeetCode上果然有原题 说实话我对自己的算法能力还是比较有自信的(虽然结果不是很理想) 先看第一道题吧 74. Search a 2D Matrix Write an...

2016-10-15 02:30:00 96

转载 LeetCode Single Number I,II,III (136,137,260)

把三道 Single Number 放一起做了吧,三道都是位操作的题 136. Single Number 除了一个数,其他数都出现2次,找那个唯一的数 利用异或操作,偶数重复的元素异或结果为0,不影响 public class Solution { public int s...

2016-10-12 15:34:00 107

转载 LeetCode 338.Counting Bits

直接迈入中等难度了,没啥时间了 Given a non negative integer numbernum. For every numbersiin the range0 ≤ i ≤ numcalculate the number of 1's in their binary ...

2016-10-10 00:39:00 96

转载 LeetCode 141. Linked List Cycle

141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 就是找链表是否有环...

2016-10-06 02:01:00 96

转载 LeetCode 121. Best Time to Buy and Sell Stock

121. 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 pe...

2016-10-06 01:35:00 67

转载 LeetCode 107. Binary Tree Level Order Traversal II

107. Binary Tree Level Order Traversal II Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to...

2016-10-05 18:22:00 120

转载 LeetCode 198. House Robber

198. House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only...

2016-10-05 16:45:00 81

转载 LeetCode 401. Binary Watch

401. Binary Watch A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59...

2016-10-02 00:28:00 63

转载 LeetCode 169. Majority Element

169. Majority Element Given an array of sizen, find the majority element. The majority element is the element that appearsmore than⌊ n/2 ⌋tim...

2016-09-29 16:22:00 90

转载 LeetCode解题路程(7)

刚经过了华为的面试,虽然各种项目经理上被喷了不少,还好算法上稍微挽回一点 在leetcode上解题对于找工作无疑是帮助很大的 404. Sum of Left Leaves Find the sum of all left leaves in a given binary tree. ...

2016-09-27 16:38:00 76

转载 LeetCode解题路程(6)

235. Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in...

2016-09-25 14:51:00 88

转载 LeetCode解题路程(5)

258. Add Digits Given a non-negative integernum, repeatedly add all its digits until the result has only one digit. For example: Givennum = 3...

2016-09-20 12:52:00 117

转载 char in Java

在Java中,一个char类型变量能否存储一个中文汉字? 答案是肯定的,显然,Java中一个char变量能够存储一个中文汉字 char ch = '中';String chstr = "你好"System.out.println(chstr.length()); // 2 因为在...

2016-09-19 16:07:00 211

转载 LeetCode解题路程(4)

290. Word Pattern Given apatternand a stringstr, find ifstrfollows the same pattern. Herefollowmeans a full match, such that there is a b...

2016-09-19 14:29:00 145

转载 LeetCode解题路程(3)

326. Power of Three Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop...

2016-09-18 15:15:00 85

转载 LeetCode解题路程(2)

这次用可视化编辑器试试 题目就一道,寻找数组交集 350. Intersection of Two Arrays II Given two arrays, write a function to compute their intersection. Example: Givenn...

2016-09-14 21:57:00 99

转载 LeetCode解题路程(1)

不知不觉,终于迎来了找工作的日子,我知道自己是个noob,但也想写点什么,做点什么,就写点leetcode的解题,不是见解,更不是教程,只是记录397.IntegerReplacementGiven a positive integer n and you can do operation...

2016-09-13 18:02:00 96

空空如也

空空如也

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

TA关注的人

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