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

 

China coronavirus spread is accelerating, Xi Jinping warns (26 Jan 2020)

 

Impeachment: Democrats undoing 2016 election, say Trump lawyers (25 Jan 2020)

 

Boeing 777X: World’s largest twin-engine jet completes first flight (26 Jan 2020)

 

Three women who were part of a quiet resistance against the Nazis in Berlin (26 Jan 2020)

 

Grammys 2020: Seven things to watch out for - and how to watch the ceremony (26 Jan 2020)

 

Oxford professor given protection following threats from trans activists (25 Jan 2020)

 

Thai officials accidentally auction off car loaded with amphetamine (25 Jan 2020)

 

Arizona man dresses up skeleton to drive in HOV lane (25 Jan 2020)

 

Iraqi security forces raid Baghdad protest site (25 Jan 2020)

 

Iran executes 'Crocodile of the Gulf' drug kingpin (25 Jan 2020)

more »

 

SF Gate

 

Ship traffic, January 26 (25 Jan 2020)

 

Twitter tells AI startup its face data is off limits (24 Jan 2020)

 

Climate change could cause the next financial meltdown (24 Jan 2020)

 

Ship traffic, January 27 (24 Jan 2020)

 

Ship traffic, January 25 (24 Jan 2020)

 

New internet customers boost Comcast 4th-quarter profit (23 Jan 2020)

more »


Site feed Updated: 2020-Jan-25 21:00