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

 

Khashoggi killing: Turkey vows to reveal 'truth' on Saudi critic's death (20 Oct 2018)

 

People's Vote march: Hundreds of thousands attend London protest (20 Oct 2018)

 

Migrant caravan: 'May God soften Trump's heart' (20 Oct 2018)

 

Afghanistan election: Voters defy violence to cast ballots (20 Oct 2018)

 

Cate Blanchett defends straight actors playing LGBT roles (20 Oct 2018)

 

Brazil museum fire: Prized 'Luzia' fossil skull recovered (20 Oct 2018)

 

Mohammed Dewji: Kidnapped billionaire 'home safely' (20 Oct 2018)

 

Australia government suffers Wentworth by-election defeat (20 Oct 2018)

 

Blast-off for BepiColombo on mission to Mercury (20 Oct 2018)

 

Migrant caravan halted by Mexico police on Guatemala border (20 Oct 2018)

more »

 

SF Gate

 

How the blockchain could break Big Tech’s hold on AI (19 Oct 2018)

 

What’s next for Paul Allen’s big investments? It’s not clear (19 Oct 2018)

 

Netflix’s cash-fueled road to streaming dominance (19 Oct 2018)

 

Where has all the Tab gone? Fans panic at a shortage (19 Oct 2018)

 

China’s economy hits slowest pace in a decade (19 Oct 2018)

 

Best Alexa-compatible smart home gadgets (19 Oct 2018)

more »


Site feed Updated: 2018-Oct-20 09:00