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

 

India election 2019: Narendra Modi thanks voters for 'historic mandate' (23 May 2019)

 

Brexit: Theresa May's withdrawal bill delayed (23 May 2019)

 

John Walker Lindh: Anger as 'American Taliban' freed (23 May 2019)

 

European elections 2019: EU citizens turned away from UK polls (23 May 2019)

 

The Bittersweet Symphony dispute is over (23 May 2019)

 

Not your average police chase (23 May 2019)

 

Rush wins Australia's biggest defamation payout (23 May 2019)

 

Woman aged 102 suspected of care home murder (23 May 2019)

 

Nancy Pelosi calls for 'intervention' with 'villainous' Trump (23 May 2019)

 

Killer tornado hurls US elderly couple from home (23 May 2019)

more »

 

SF Gate

 

Google changes rules on abortion ads after complaints (22 May 2019)

 

Consumer Reports: Tesla automated lane changes are risky (22 May 2019)

 

Judge rules Qualcomm violated antitrust law in chip market (22 May 2019)

 

On the job hunt? These are the companies hiring the most in the Bay Area (22 May 2019)

 

Penney’s, Kohl’s struggle in 1st quarter (21 May 2019)

 

Huawei ban delay gives tech sector time to adjust (21 May 2019)

more »


Site feed Updated: 2019-May-23 12:00