自定义博客皮肤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)
  • 资源 (1)
  • 收藏
  • 关注

原创 LeetCode 213. House Robber II 注意考察环尾和环头交叉处

213. House Robber II After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this plac

2017-06-20 21:38:21 325

原创 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 constraint stopping you from robbing each of them is

2017-06-20 21:21:55 664

原创 LeetCode 343. Integer Break 动态规划,状态转移方程

343. Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For exa

2017-06-19 15:51:36 520

转载 C++类内存分布 通过Visual studio 2013查看

C++类内存分布转载自:http://www.cnblogs.com/jerry19880126/p/3616999.html书上类继承相关章节到这里就结束了,这里不妨说下C++内存分布结构,我们来看看编译器是怎么处理类成员内存分布的,特别是在继承、虚函数存在的情况下。工欲善其事,必先利其器,我们先用好Visual Studio工具,像下面这样一步一步来: 

2017-06-17 10:25:44 895 6

原创 LeetCode 64. Minimum Path Sum 动态规划

64. Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move

2017-06-16 16:03:58 491

原创 LeetCode 120. Triangle 动态规划

120. Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [

2017-06-15 23:03:49 929

原创 LeetCode 70. Climbing Stairs 自顶向下记忆化搜索,自底向上重叠子问题动态规划

70. Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Not

2017-06-15 19:31:30 594

原创 LeetCode 51. N-Queens 回溯

51. N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-q

2017-06-14 21:04:05 314

原创 LeetCood 200. Number of Islands floodfill算法,回溯算法

200. Number of Islands Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or ve

2017-06-13 22:31:15 478

原创 LeetCode 79. Word Search 二维平面使用回溯法

79. Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizon

2017-06-13 20:44:37 1089

原创 LeetCode 77. Combinations 组合问题C(n,k),树形状态回溯,优化减枝

77. Combinations Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2

2017-06-06 21:08:42 746

原创 LeetCode 46. Permutations 全排列,树形状态回溯

46. Permutations Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3

2017-06-05 22:20:27 684

原创 LeetCode 131. Palindrome Partitioning 树形问题,状态回溯

131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s

2017-06-05 21:03:01 618

原创 LeetCode 17. Letter Combinations of a Phone Number 递归回溯法

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 telepho

2017-06-05 20:35:02 1347

原创 LeetCode 235. Lowest Common Ancestor of a Binary Search Tree 二叉搜索树

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 the BST. According to the definition of LCA on W

2017-06-02 22:11:21 325

原创 LeetCode 437. Path Sum III 递归中使用递归,分两类情况

437. Path Sum III You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need to start or end at the

2017-06-02 22:00:40 538

原创 LeetCode 257. Binary Tree Paths 递归过程保存信息

257. Binary Tree Paths 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:

2017-06-01 21:24:43 368

空空如也

空空如也

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

TA关注的人

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