自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 leetcode241 : Different Ways to Add Parentheses

1、原题如下: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example 1

2015-10-30 11:42:33 268

原创 leetcode 257 : Binary Tree Paths

1、原题如下: Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree:1 / \ 2 3 \ 5 All root-to-leaf paths are:[“1->2->5”, “1->3”]2、解题如下:/** * Definit

2015-10-29 14:16:51 295

原创 leetcode 260 : Single Number III

1、原题如下: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.For example:Given nu

2015-10-28 15:45:19 309

原创 leetcode 264 : Ugly Number II

1、原题如下: Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the firs

2015-10-28 12:40:18 304

翻译 office技巧-1 : 如何在excel中将不连续的空格替换成相同的值

1、选中你想要替换的部分 2、按下Ctrl+G,在窗口中选择定位条件 3、然后选择空值,点击确认 4、我们会发现,选中区域变成了之前选中区域的空值部分 5、键盘输入你想要输入的值,按下Ctrl+回车即可~

2015-10-27 18:54:46 1987

原创 leetcode 268 : Missing Number

1、原题如下: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] return 2.2、解题如下:class Solution {public:

2015-10-27 15:07:22 288

原创 leetcode 273 : Integer to English Words

1、原题如下: Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1.For example, 123 -> “One Hundred Twenty Three” 12345 -> “Twelve Thousand

2015-10-27 14:21:31 242

原创 leetcode 274 : H-Index

1、原题如下: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.According to the definition of h-index on Wikipedia:

2015-10-27 10:02:37 286

原创 leetcode 297 : Serialize and Deserialize Binary Tree

1、原题如下: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection li

2015-10-26 19:25:18 204

原创 leetcode 295 : Find Median from Data Stream

1、原题如下: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. Examples: [2,3,4] , the

2015-10-24 15:32:53 259

原创 代码量统计方法

相信各位也会碰见一个大工程,突然要说统计代码量~下面介绍用正则表达式的方法统计,而非计算器~(原谅我的愚昧。。。直到数完才知道有好用的方法)步骤:1、打开整个工程,并选择查找与替换(快捷键是ctrl+shift+f)2、勾选正则表达式,并在下方选择你要搜索的文件类型3、在搜索的部分输入 ^:b*[^:b#/]+.*$ 并确定查找,即可根据匹配行得到最后的代码量结论![图A](http:

2015-10-22 19:11:55 422

原创 leetcode 279 : Perfect Squares

1、原题如下 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n. For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n =

2015-10-22 18:41:07 283

原创 leetcode282 : Expression Add Operators

1、原题如下: Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value

2015-10-15 14:51:55 414

原创 leetcode284 : Peeking Iterator

1、原题如下: iven an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation – it essentially peek() at the element that will b

2015-10-13 19:23:38 365

原创 leetcode287 : Find the Duplicate Number

1、原题如下 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate num

2015-10-13 11:32:11 294

原创 leetcode292 : Nim Game

1、原题如下 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will

2015-10-13 09:56:15 463

原创 leetcode289 : Game of Life

1、原题如下: According to the Wikipedia’s article: “The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.”Given a board with

2015-10-12 20:28:58 430

原创 leetcode290 : Word Pattern

1、原题如下 Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.Exa

2015-10-11 18:57:08 296

原创 leetcode 237 : Delete Node in a Linked List

1、原题如下: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with v

2015-10-05 18:23:16 279

原创 leetcode 242 :Valid Anagram

1、原题如下 Given two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return false.2、解题如下class Solutio

2015-10-01 21:01:16 296

空空如也

空空如也

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

TA关注的人

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