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

 

Delhi riots: City tense after Hindu-Muslim clashes leave 23 dead (26 Feb 2020)

 

Sydney baboons go on the run before vasectomy (26 Feb 2020)

 

Appeal for more funds to control locusts (26 Feb 2020)

 

Maria Sharapova retires: Five-time Grand Slam champion 'says goodbye' to tennis at 32 (26 Feb 2020)

 

Germany overturns ban on professionally assisted suicide (26 Feb 2020)

 

White Helmets appeal for help from world powers in Syria's Idlib (26 Feb 2020)

 

Hong Kong to give cash gift of ,200 to residents (26 Feb 2020)

 

Singer Duffy 'drugged, raped and held captive' (26 Feb 2020)

 

Weinstein's lawyer Donna Rotunno: 'The fight is not over' (26 Feb 2020)

 

Mario Cerciello Rega case: US students in Italian court over police murder (26 Feb 2020)

more »

 

SF Gate

 

Stocks sink, boards soar on virus fears (26 Feb 2020)

 

Car and driver blamed in fatal Tesla crash (25 Feb 2020)

 

As the startup boom deflates, tech is humbled (24 Feb 2020)

 

Dow drops more than 1,000 as outbreak threatens the economy (24 Feb 2020)

 

Ship traffic, February 25 (24 Feb 2020)

 

Can AI flag disease outbreaks faster than humans? Not quite (23 Feb 2020)

more »


Site feed Updated: 2020-Feb-26 07:00