一次总结两道题,两道题目都比较基础Description:Write a function to
find the longest common prefix string amongst an array of strings.分析:
这道题目最重要的知道什么叫prefix前缀, 否则一不小心就做...
分类:
其他好文 时间:
2014-06-09 21:08:16
阅读次数:
224
原题地址:https://oj.leetcode.com/problems/scramble-string/题意:Given
a strings1, we may represent it as a binary tree by partitioning it to two
non-empty su...
分类:
编程语言 时间:
2014-06-09 19:02:59
阅读次数:
197
原题地址:https://oj.leetcode.com/problems/search-in-rotated-sorted-array/题意:Suppose
a sorted array is rotated at some pivot unknown to you beforehand.(i.e...
分类:
编程语言 时间:
2014-06-09 18:43:14
阅读次数:
273
二叉链表的C语言描述基本运算的算法——建立二叉链表、先序遍历二叉树、中序遍历二叉树、后序遍历二叉树、后序遍历求二叉树深度#include#includeusing
namespace std;class Tree{private: struct Node { char da...
分类:
其他好文 时间:
2014-06-09 18:39:49
阅读次数:
310
linux下tree命令详解分类: linux 2013-08-16 09:24 259人阅读
评论(0) 收藏 举报(1)tree -a 显示所有文件和目录(2)tree -d 显示目录名称而非内容(3)tree -f
在每个文件或目录之前,显示完整的相对路径名称(4)tree -F 在执行文.....
分类:
系统相关 时间:
2014-06-09 16:22:45
阅读次数:
295
方法一:正则分析法function getQueryString(name) { var
reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r =
window.location.search.substr(1).m...
分类:
Web程序 时间:
2014-06-09 16:03:15
阅读次数:
293
【Project Browser】 You can drag items from the
project structure list to the Favourites and also save search queries there. The
filters work by add...
分类:
其他好文 时间:
2014-06-09 15:25:46
阅读次数:
282
GRID的行设置前景色和背景色$dataItem->set_row_color("red");
// 设置背景色 $dataItem->set_row_style("color:red"); //
设置前景色GRID支持多行显示mygrid.enableMultiline(true);TREE节点提...
分类:
Web程序 时间:
2014-06-09 15:23:45
阅读次数:
245
同是递归简单题public class Solution { public boolean
isSameTree(TreeNode p, TreeNode q) { boolean flag = true; if(p == null
&& q == null) ...
分类:
其他好文 时间:
2014-06-09 13:46:23
阅读次数:
275
题目链接题意: 给定一棵二叉树, 判断是否为平衡二叉树, 这里的平衡二叉树指的是:每个结点的左右子树的深度之差不超过1。附上代码:
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * ...
分类:
其他好文 时间:
2014-06-08 18:58:35
阅读次数:
194