摘要:
236. Lowest Common Ancestor of a Binary Tree Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to t 阅读全文
摘要:
Senario: 1) one to one send message 2) sent/deleveried/read 3) user online status , online/last seen 5min 4) send image, video,file 5) group chat DAU: 阅读全文
摘要:
169. Majority ElementGiven an array nums of size n, return the majority element.The majority element is the element that appears more than ?n / 2? tim 阅读全文
摘要:
数组实现方式(类似与heap的实现方式): class NumArray { int[] arr=null; int len = 0; public NumArray(int[] nums) { len = nums.length; arr = new int[len*10]; buildSegTr 阅读全文
摘要:
1.why do we consist hashing? problem: if we just use the normal hashing, for example, firstly we have 3 nodes in our db system, all the hashcode%3==0 阅读全文