| 2016-08-24LeetCode Majority Element 169169. Majority Element Given an array of size n, find the majority element. The m ...
| 2016-08-23LeetCode First Unique Character in a String 387387. First Unique Character in a String Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1. Examples: s = "leetcode"return 0.s = "loveleetc ...
| 2016-08-23LeetCode Maximum Depth of Binary Tree 104104. Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 自己的解法自己想到应该用递归、为空的返回 0 ...
| 2016-08-22【此生为完成】随笔我们要用多大的代价,才能认清活着的意义?于娟,这个风华正茂的女子,拥有留洋经历和博士学位的复旦大学青年教师,在与晚期癌症抗争一年又四个月后,终于撒手人寰。她带走的家人的思念和不舍,给我们留下坚强的力量。 《此生未完成》这本书是上周末聚会时 Zhen 提到的,上周京东买书就带上了。书里前半探讨作者在生死临界时对生活、工作、名利、家人、朋友的一些看法和思考。这对于刚刚毕业的我来说,确实有些是无法真切体会到的,毕竟经历少。但是在书的字里行间中,仍然可以看到一个(不知道用什么词) ...
| 2016-08-22LeetCode Intersection of Two Arrays 349349. Intersection of Two Arrays Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Eac ...
| 2016-08-22LeetCode Same Tree 100100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 关于树结构自己没怎么看过,查了查遍 ...
| 2016-08-22LeetCode Excel Sheet Column Title 168168. Excel Sheet Column Title Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A2 -> B3 -> C...26 -> Z27 -> AA28 -> AB 自己的思路十进制转“二十六进制” public Str ...
| 2016-08-22LeetCode Excel Sheet Column Number 171171. Excel Sheet Column Number Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1B -> 2C -> 3...Z -> 26AA -> 27AB -> 28 自己的思路很像是“二十六进制”转十进制 public in ...
| 2016-08-17【蛤蟆的油】随笔日本民间流传着这样一个故事:在深山里,有一种特别的蛤蟆,它和同类相比不仅外表更丑,而且还多长了几条腿。人们转到它后,将其放在镜前或者玻璃箱内,蛤蟆一看到自己丑陋不堪的真面目,不禁吓出一身油。这种油,也是民间用来治疗烧伤烫伤的珍贵药材。 第一次写人文类书籍的笔记。 故事是从黑泽明一岁多光着身子洗澡开始回忆的,然后按时间,一个个小故事讲述自己。 (一) 二年级是他得到了“糖酥”这个绰号,因为有人揪他的头发,往他西装上抹鼻涕,让他哭了好几次。 想到了自己大概三四年级的一件事:一 ...
| 2016-08-16LeetCode Move Zeroes 283283. Move Zeroes Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], after calling your function, ...