摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
My solution java public class Solution { public int lengthOfLongestSubstring(String s) { int[] c = new int[256]; int j = 0; int longest = 0; for (int 阅读全文
摘要:
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. 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文