- 博客(8)
- 收藏
- 关注
转载 Mac OS X 10.10 装gdb
homebrew地址:https://github.com/Homebrew/homebrew-dupes 要安装有homebrew,homebrew 是一个包管理器。 安装gdb 的命令如下,安装完之后需要对gdb 进行签名,签名方式转载自:http://plotcup.com/a/129 brew install https://raw.github.com/Homebrew
2015-09-25 12:42:19 328
原创 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 either down or right at
2015-09-13 10:29:28 262
原创 Sort Colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers
2015-09-13 09:42:23 311
原创 Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()
2015-09-13 09:22:39 282
转载 字符串和编码
原文链接:http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001386819196283586a37629844456ca7e5a7faa9b94ee8000 字符编码 我们已经讲过了,字符串也是一种数据类型,但是,字符串比较特殊的是还有一个编码问题。
2015-09-11 13:14:21 287
原创 Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of
2015-09-09 17:33:20 259
转载 <二叉树 前中后 层序 非递归遍历 c语言实现>
非递归遍历要用到stack,出栈即访问 前序遍历:(中结点->左结点->右节点) 思路:先将根节点入栈,之后进入循环,先出栈一个结点A, 之后如果存在的话,将A的右结点入栈,再将A的左结点入栈,之后继续循环。。这样一直循环到栈空为止。 中序遍历: (左结点->中结点->右节点) 思路:扫描根节点,将其所有左孩子结点全部入栈, 之后出栈
2015-09-06 18:20:30 507
转载 Unique Binary Search Trees
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \
2015-09-02 17:38:15 188
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人