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

 

Egypt hits 'jihadist camps' after attack on Coptic Christians (26 May 2017)

 

Trump foreign tour: G7 leaders turn attention to Africa (27 May 2017)

 

Manchester attack: Ariana Grande plans benefit gig (26 May 2017)

 

Manchester attack: Editor defends publishing leaked photos (26 May 2017)

 

Kushner 'discussed secret line to Moscow' - US media reports (27 May 2017)

 

Clinton makes digs at Trump (26 May 2017)

 

Genene Jones, former Texas nurse, charged again with baby murder (26 May 2017)

 

Libya turmoil: Rival armed groups clash in capital, Tripoli (26 May 2017)

 

UK achieves solar power record as temperatures soar (26 May 2017)

 

Germany vaccination: Fines plan as measles cases rise (26 May 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)

 

Pressure mounts for VW to invest in low-income communities (26 May 2017)

 

GDP growth upgraded, still slow in 1st quarter (26 May 2017)

 

DMV, CHP to inspect Uber’s self-driving-truck garage (26 May 2017)

 

Meal delivery service Sprig shuts down (26 May 2017)

 

Lights out! Eclipse to cut solar power in California (25 May 2017)

 

Jury rules with UC Davis in fight over strawberries (25 May 2017)

more »

 


Site feed Updated: 2017-May-27 00:00