11 2014 档案
摘要:It’s easy to see that Paxos does have a failure mode. When two proposers are active at the same time, they may ‘duel’ for highest proposal number by a...
阅读全文
摘要:same question as:why is PAXOS necessary?1, what if >1 nodes become leaders simultaneously?that's why we need phase#1 (prepare) to select a leader.2, w...
阅读全文
摘要:Problem:given an array that contains duplicates (except one value), find the one value that does not have a duplicate in that array. Explain the compl...
阅读全文
摘要:given several intervals, how to find a interval which is a intersect of the most number of the given intervals?Method:Step1: Represent eachreturnedint...
阅读全文
摘要:function gcd(a, b) if b = 0 return a else return gcd(b, a mod b)
阅读全文