2018年12月29日

2018随笔

摘要:为什么有一种一年不如一年、越过越失败的感觉? 阅读全文

posted @ 2018-12-29 12:18 NULL00 阅读(136) 评论(0) 推荐(0) 编辑

2017年4月24日

巴塞罗那VS皇家马德里

摘要:刚刚看完巴萨VS皇马的比赛,跌宕起伏,悬念保持到了最后一分钟的最后一回合 梅西绝杀。 工作之后,很少看比赛了。一直觉得梅西、C罗双子星的时代正在接近尾声,自己要尽量看一场少一场,免得到时后悔,但平时不知去忙什么了。 刚才发现五年前自己还写了篇博文巴塞罗那VS皇家马德里,时光飞逝啊,自己老了五岁了。 阅读全文

posted @ 2017-04-24 04:51 NULL00 阅读(519) 评论(0) 推荐(0) 编辑

2016年2月24日

Redis代码阅读之Hacking Strings

摘要:Hacking Strings The implementation of Redis strings is contained in sds.c ( sds stands for Simple Dynamic Strings ).The C structure sdshdr declared in 阅读全文

posted @ 2016-02-24 05:46 NULL00 阅读(624) 评论(0) 推荐(0) 编辑

2016年1月14日

LeetCode - 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... 阅读全文

posted @ 2016-01-14 15:10 NULL00 阅读(511) 评论(0) 推荐(0) 编辑

2016年1月13日

LeetCode - Pascal's Triangle II

摘要:题目:Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to ... 阅读全文

posted @ 2016-01-13 15:44 NULL00 阅读(258) 评论(0) 推荐(0) 编辑

LeetCode - Pascal's Triangle

摘要:题目:Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1... 阅读全文

posted @ 2016-01-13 15:42 NULL00 阅读(346) 评论(0) 推荐(0) 编辑

LeetCode - Populating Next Right Pointers in Each Node II

摘要:题目:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution s... 阅读全文

posted @ 2016-01-13 15:41 NULL00 阅读(382) 评论(0) 推荐(0) 编辑

LeetCode - Populating Next Right Pointers in Each Node

摘要:题目:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next poi... 阅读全文

posted @ 2016-01-13 14:38 NULL00 阅读(337) 评论(0) 推荐(0) 编辑

LeetCode - Distinct Subsequences

摘要:题目:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from... 阅读全文

posted @ 2016-01-13 14:17 NULL00 阅读(358) 评论(0) 推荐(0) 编辑

LeetCode - Flatten Binary Tree to Linked List

摘要:题目:Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 6The flatten... 阅读全文

posted @ 2016-01-13 13:44 NULL00 阅读(305) 评论(0) 推荐(0) 编辑

2016年1月10日

LeetCode - Path Sum II

摘要:题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and s... 阅读全文

posted @ 2016-01-10 13:29 NULL00 阅读(388) 评论(0) 推荐(0) 编辑

LeetCode - Path Sum

摘要:题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum... 阅读全文

posted @ 2016-01-10 13:08 NULL00 阅读(330) 评论(0) 推荐(0) 编辑

LeetCode - Minimum Depth of Binary Tree

摘要:题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest... 阅读全文

posted @ 2016-01-10 12:49 NULL00 阅读(246) 评论(0) 推荐(0) 编辑

LeetCode - Balanced Binary Tree

摘要:题目:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the de... 阅读全文

posted @ 2016-01-10 12:34 NULL00 阅读(252) 评论(0) 推荐(0) 编辑

LeetCode - Convert Sorted List to Binary Search Tree

摘要:题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.思路:转化为数组,更容易搜寻中点package bst;class List... 阅读全文

posted @ 2016-01-10 12:03 NULL00 阅读(171) 评论(0) 推荐(0) 编辑

导航