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

 

Covid: US death toll passes 200,000 (23 Sep 2020)

 

Covid: US funeral directors reflect on 200,000 death toll (22 Sep 2020)

 

UK sends US evidence on Islamic State 'Beatles' (23 Sep 2020)

 

Australia whale stranding: 470 animals now beached in Tasmania record (23 Sep 2020)

 

Johnson warns of tougher curbs if UK rules flouted (23 Sep 2020)

 

Musk: ,000 Tesla ready 'in about three years' (23 Sep 2020)

 

Dark web drugs raid leads to 179 arrests (22 Sep 2020)

 

UN General Assembly: US-China tensions flare over coronavirus (22 Sep 2020)

 

Europe migration: EU to reveal mandatory rules on migration (23 Sep 2020)

 

Ginsburg Supreme Court: Republicans secure vote for replacement (22 Sep 2020)

more »

 

SF Gate

 

Ship traffic, September 23 (22 Sep 2020)

 

Ship traffic, September 22 (21 Sep 2020)

 

Ship traffic, September 21 (20 Sep 2020)

 

Ship traffic, September 19 (18 Sep 2020)

 

Ship traffic, September 20 (18 Sep 2020)

 

Ship traffic, September 18 (17 Sep 2020)

more »


Site feed Updated: 2020-Sep-22 21:00