- 博客(8)
- 收藏
- 关注
原创 43. Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are non-negative.Convertingthe input string to integer is NOT
2016-06-30 22:08:42 333
原创 85. Maximal Rectangle
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.DP解法0th row: 0 0 0 1 0 0 0height: 0 0 0 1 0 0 0left: 0 0 0 3 0 0 0right 7 7 7 4 7
2016-06-28 21:07:32 180
原创 69. Sqrt(x)和367. Valid Perfect Square
69.Sqrt(x)Implement int sqrt(int x).Compute and return the square root of x.367.Valid Perfect SquareGiven a positive integer num, write a function which returns True if num is a perfect square else Fal
2016-06-28 15:22:47 307
原创 139. Word Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, given s = "leetcode", dict = ["leet", "co
2016-06-16 17:28:35 222
转载 C++ 引用计数技术及智能指针的简单实现
本文转载自http://www.cnblogs.com/QG-whz/p/4777312.html正文一直以来都对智能指针一知半解,看C++Primer中也讲的不够清晰明白(大概是我功力不够吧)。最近花了点时间认真看了智能指针,特地来写这篇文章。1. 智能指针是什么简单来说,智能指针是一个类,它对普通指针进行封装,使智能指针类对象具有普通指针类型一样的操作。具体而言,复制对象时,副本和原对象都指向同
2016-06-15 10:35:08 262
原创 134. Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its nex
2016-06-14 22:31:55 191
原创 17. Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string "23"O
2016-06-13 22:06:13 174
原创 330. Patching Array
Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some elements in the array. Retur
2016-06-13 11:26:37 137
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人