2019年4月22日
摘要: It's too tired preparing for interview while working. So I had a totally relaxing, leetcode free weekend. As for leetcode 6, the most stable way to so 阅读全文
posted @ 2019-04-22 21:57 王 帅 阅读(79) 评论(0) 推荐(0) 编辑
  2019年4月18日
摘要: Compared with official solution, below code is easier to implement. Because I don't think I can come up with in a interview. java class Solution { pub 阅读全文
posted @ 2019-04-18 23:03 王 帅 阅读(90) 评论(0) 推荐(0) 编辑
  2019年4月17日
摘要: My solution java public class Solution { public int lengthOfLongestSubstring(String s) { int[] c = new int[256]; int j = 0; int longest = 0; for (int 阅读全文
posted @ 2019-04-17 23:19 王 帅 阅读(109) 评论(0) 推荐(0) 编辑
  2019年4月16日
摘要: It's really tired after a whole day's work and a phone interview after work. So I decided to relax and end today with a nice and easy and two numbers. 阅读全文
posted @ 2019-04-16 23:52 王 帅 阅读(140) 评论(0) 推荐(0) 编辑
  2019年4月15日
摘要: I saw in a blog that leetcode 23 is the hardest Linked List problem in leetcode. But I don't think it's that hard. 阅读全文
posted @ 2019-04-15 22:58 王 帅 阅读(115) 评论(0) 推荐(0) 编辑
  2019年4月14日
摘要: I never tried before to implement postorder traversal of binary tree with non recursive method. So the ugly handwork is attached below. But In the dis 阅读全文
posted @ 2019-04-14 20:30 王 帅 阅读(88) 评论(0) 推荐(0) 编辑
  2019年4月12日
摘要: I saw something really interesting tonight…... So I tried this problem, but failed to figure out the O(n logn) algorithm java class Solution { public 阅读全文
posted @ 2019-04-12 23:32 王 帅 阅读(108) 评论(0) 推荐(0) 编辑
  2019年4月10日
摘要: recursive version Non recursive. It's relatively simple. So no explaination. 阅读全文
posted @ 2019-04-10 10:58 王 帅 阅读(97) 评论(0) 推荐(0) 编辑
摘要: recursive method non recursive method My non recursive version is attached below. The basic idea is making sure that the stack peek node is the first 阅读全文
posted @ 2019-04-10 10:39 王 帅 阅读(97) 评论(0) 推荐(0) 编辑
  2019年4月8日
摘要: If you are familiar with both heap and complete binary tree, you'll find them much the same in finding parent. Mark from tree node with index 1, and t 阅读全文
posted @ 2019-04-08 21:36 王 帅 阅读(134) 评论(0) 推荐(0) 编辑