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

 

Aukus: Australia defends role in security pact amid French condemnation (19 Sep 2021)

 

Afghanistan: Stay home, female Kabul government workers told (19 Sep 2021)

 

Manny Pacquiao: Boxing star to run for Philippines president (19 Sep 2021)

 

Afghanistan: The 'shattered dreams' of the Ariana cabin crew (18 Sep 2021)

 

Johannesburg mayor Jolidee Matongo killed in car crash (19 Sep 2021)

 

Volcano on Canary Island La Palma erupts, spewing ash and lava into national park (19 Sep 2021)

 

History-making space tourists splash down to Earth (19 Sep 2021)

 

Russia election: Opposition complaints on final day of voting (19 Sep 2021)

 

Police outnumber protesters at right-wing Capitol rally (19 Sep 2021)

 

Migrants in Texas: Thousands moved to processing centres (19 Sep 2021)

more »

 

SF Gate

 

13 Best Background Check Sites & Services: Search Criminal Records and Social Media Accounts Online (28 Jul 2021)

 

It pays to search for top-quality auto shop (6 Feb 2021)

 

Fired Boeing CEO is now working with Bay Area tractor startup (14 Dec 2020)

 

PG&E bills to rise over per year on average to fund wildfire risk reduction (5 Dec 2020)

 

Nasdaq seeks more diversity on boards of companies listed on exchange (2 Dec 2020)

 

Elizabeth Holmes Prosecutors Say Texts Show Theranos Beset With Problems (24 Nov 2020)

more »


Site feed Updated: 2021-Sep-15 12:00