tungwaiyip.info

home

about me

links

Blog

< March 2010 >
SuMoTuWeThFrSa
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
28293031   

past articles »

Click for San Francisco, California Forecast

San Francisco, USA

 

Peak Traffic Solution (Facebook Programming Puzzle)

The Peak Traffic puzzle is easy to interpret. It is a graph problem to find all maximal cliques. Implementating it, like many graph problems, is quite difficult though. The possible combination is huge. And there is no simple ordering graph subset. It end up costed me several days to do it. Here is the outline of my solution:

  1. Parse the input. Generate an undirected graph.
  2. Generate a list of cliques using recursive algorithm.
  3. Eliminate subsets from the result to find all maximal cliques.

After working on it for several days, I'm quite done. I haven't spent any more effort to optimize it and expain it. So here is my un-tidied code.

2010.03.03 [] - comments

 

 

blog comments powered by Disqus

past articles »

 

BBC News

 

Sri Lanka explosions: 137 killed as churches and hotels targeted (21 Apr 2019)

 

Ukraine election: Voters choose between comic and tycoon (21 Apr 2019)

 

Agent Orange: US to clean up toxic Vietnam War air base (20 Apr 2019)

 

Millions using 123456 as password, security study finds (20 Apr 2019)

 

Amir Khan beaten by Terence Crawford after low blow (21 Apr 2019)

 

SpaceX capsule suffers 'anomaly' during tests in Florida (21 Apr 2019)

 

Yellow vest protests: Paris police fire tear gas at demonstrators (20 Apr 2019)

 

Columbine survivors mark twentieth anniversary of massacre (21 Apr 2019)

 

Ku Klux Klan killing: Wife admits murder of Missouri leader (20 Apr 2019)

 

US arrests 'member of border militia' in New Mexico (20 Apr 2019)

more »

 

SF Gate

 

Smart doorbells to watch over your front stoop (20 Apr 2019)

 

Alibaba head’s remarks spark debate over China working hours (20 Apr 2019)

 

Lehman Bros., a family saga, as viewed by some who lived it (19 Apr 2019)

 

Checking on Social Security estimates is a good idea, but many people don’t do it (19 Apr 2019)

 

After social media bans, militant groups found ways to remain (19 Apr 2019)

 

FTC reportedly considering oversight of Facebook’s Zuckerberg (19 Apr 2019)

more »


Site feed Updated: 2019-Apr-21 03:00