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

 

Gulf of Oman: Saudi Arabia blames tanker attacks on rival Iran (15 Jun 2019)

 

Hong Kong extradition bill: Protesters vow to push ahead (15 Jun 2019)

 

Priests wear hard hats at Notre-Dame (15 Jun 2019)

 

Babe Ruth jersey fetches record-breaking .6m at auction (16 Jun 2019)

 

Sudan: Friends pay tribute to victim of Sudan protests (15 Jun 2019)

 

India announces retaliatory trade tariffs against the US (15 Jun 2019)

 

Nazanin Zaghari-Ratcliffe begins new hunger strike (15 Jun 2019)

 

Italian film director Franco Zeffirelli dies at 96 (15 Jun 2019)

 

Chris Froome 'fully focused' on return after high-speed crash (15 Jun 2019)

 

Amanda Knox feared attacks and accusations on return to Italy (15 Jun 2019)

more »

 

SF Gate

 

A digital helper that puts user privacy first (15 Jun 2019)

 

Savings accounts for disabled Americans catch on, but slowly (15 Jun 2019)

 

Come for a new alternator, stay for the salmon or a movie (15 Jun 2019)

 

Disney gets permits to create Marvel land (15 Jun 2019)

 

These are the best phones for (15 Jun 2019)

 

Drugmakers sue to block listing prices in TV ads (14 Jun 2019)

more »


Site feed Updated: 2019-Jun-15 18:00