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

 

Jeffrey Epstein ex-girlfriend Ghislaine Maxwell arrested by FBI (02 Jul 2020)

 

US firms create record 4.8 million jobs in June (02 Jul 2020)

 

Why Texas is seeing a surge in coronavirus cases (02 Jul 2020)

 

Dozens of countries to be exempt from UK quarantine (02 Jul 2020)

 

Hundreds arrested as crime chat network cracked (02 Jul 2020)

 

Hachalu Hundessa: Ethiopia singer buried amid ethnic unrest (02 Jul 2020)

 

Hong Kong: US passes sanctions as nations condemn new law (02 Jul 2020)

 

Mexican drug rehab centre stormed by gunmen (02 Jul 2020)

 

Putin strongly backed in controversial Russian reform vote (02 Jul 2020)

 

Myanmar jade mine landslide captured on video (02 Jul 2020)

more »

 

SF Gate

 

Ship traffic, July 2 (1 Jul 2020)

 

Ship traffic, July 1 (30 Jun 2020)

 

Ship traffic, June 30 (29 Jun 2020)

 

Ship traffic, June 28 (26 Jun 2020)

 

Ship traffic, June 27 (26 Jun 2020)

 

Ship traffic, June 29 (26 Jun 2020)

more »


Site feed Updated: 2020-Jul-02 09:00