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

 

Zimbabwe latest: Ruling Zanu-PF urges Mugabe to step down (17 Nov 2017)

 

Brexit: EU gives May two weeks to act on divorce bill and Ireland (17 Nov 2017)

 

Four die as aircraft and helicopter crash in mid-air near Waddesdon (17 Nov 2017)

 

Iranian boy leads friend to food video (17 Nov 2017)

 

Argentine navy loses contact with submarine (17 Nov 2017)

 

Dog owners have lower mortality, study finds (17 Nov 2017)

 

Fireball in Finland sky 'probably a meteorite' (17 Nov 2017)

 

Fantastic Beasts 2: First look at Jude Law's young Dumbledore (17 Nov 2017)

 

Jesse Jackson diagnosed with Parkinson's (17 Nov 2017)

 

Ohio Supreme Court Judge Bill O'Neill brags of sex conquests (17 Nov 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)

 

Broadcom buys Brocade; Game Awards set; HomePod delayed (17 Nov 2017)

 

Stitch Fix’s IPO in the shadow of Amazon (17 Nov 2017)

 

Ship traffic, Nov. 20 (17 Nov 2017)

 

Ship traffic, Nov. 19 (17 Nov 2017)

 

Ship traffic, Nov. 18 (17 Nov 2017)

 

Tesla, adding to its ambitions, wants to electrify big trucks (17 Nov 2017)

more »

 


Site feed Updated: 2017-Nov-17 15:00