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

 

Germany election: Merkel wins fourth term, exit polls say (24 Sep 2017)

 

Trump NFL row: Defiance after US president urges boycott (24 Sep 2017)

 

Hurricane Maria: Puerto Rico facing crisis (24 Sep 2017)

 

Man clings to train's windscreen wiper in Australia (24 Sep 2017)

 

Falling jet wing panel damages car in Japan (24 Sep 2017)

 

Rubens lost since 1600s found in Glasgow (24 Sep 2017)

 

Bodybuilder dies after celebrity kickboxing bout in Singapore (24 Sep 2017)

 

Trump and North Korea war of words escalates (24 Sep 2017)

 

Kenya election: Chief prosecutor orders inquiry into electoral commission (24 Sep 2017)

 

Teaching the children of Boko Haram fighters (24 Sep 2017)

more »

 

SF Gate

 

Bay Area News (7 Jan 2012)

 

City Insider (11 Feb 2012)

 

Crime Scene (13 Feb 2012)

 

C.W Newius Column (10 Jan 2012)

 

C.W. Nevius Blog (11 Feb 2012)

 

Education News (10 Jan 2012)

 

KALW (11 Feb 2012)

 

Matier and Ross Blog (11 Feb 2012)

 

Former Facebook employee sues, says he faced age discrimination (24 Sep 2017)

 

Best inexpensive phones (24 Sep 2017)

 

PriceWaterhouseCoopers will open Washington law firm (23 Sep 2017)

 

Report: Number of 'Bodega' units in Bay Area greatly exaggerated (23 Sep 2017)

 

Ship traffic, September 25 (23 Sep 2017)

 

ICYMI: KB CEO’s rant, Harvard’s endowment, Hillary’s book sales and more (23 Sep 2017)

more »

 


Site feed Updated: 2017-Sep-24 12:00