摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2016-05-30 20:42 NeilZhang 阅读(230) 评论(0) 推荐(0) 编辑
摘要: SQL - Structured Query Language (结构化查询语言) 1/ SQL 命令的类型 : 数据定义语言: DDL 数据操作语言: DML 数据查询语言: DQL 数据控制语言: DCL 数据管理命令 事物控制命令 2/ 数据库 - 表 主键: 确保所有元素的标识都是唯一的 不 阅读全文
posted @ 2016-05-22 16:51 NeilZhang 阅读(369) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode*... 阅读全文
posted @ 2016-05-20 19:43 NeilZhang 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. 通过一个p指针,遍历 二叉树,并将每次的值 保存在 sum2 中 。 遇到右节点,将右节点+d 阅读全文
posted @ 2016-05-16 20:48 NeilZhang 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 不能通过 当元素中 有 val == INT_MAX 或者 val == INT_MIN 阅读全文
posted @ 2016-05-16 14:09 NeilZhang 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 算法 编程题 阅读全文
posted @ 2016-04-26 19:54 NeilZhang 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 算法 map 哈希表 阅读全文
posted @ 2016-04-24 19:58 NeilZhang 阅读(2261) 评论(0) 推荐(0) 编辑
摘要: 虚函数 多态 阅读全文
posted @ 2016-04-24 19:33 NeilZhang 阅读(2533) 评论(0) 推荐(1) 编辑
摘要: 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' 阅读全文
posted @ 2016-04-02 15:47 NeilZhang 阅读(237) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2016-04-01 13:43 NeilZhang 阅读(277) 评论(0) 推荐(0) 编辑