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

 

Russia expels Czech diplomats over explosion row (18 Apr 2021)

 

Australia opens travel bubble with New Zealand (19 Apr 2021)

 

European Super League: Premier League's 'big six' agree to join new league (19 Apr 2021)

 

Russia will face 'consequences' if Navalny dies - US (18 Apr 2021)

 

Putin critic Navalny 'will not be allowed to die in prison' (18 Apr 2021)

 

Byron Bay: Calls for Netflix boycott over reality show plans (19 Apr 2021)

 

Mars helicopter first flight: Nasa to test Ingenuity (18 Apr 2021)

 

France kidnapping: Girl found with mother accused of ordering abduction (18 Apr 2021)

 

Table Mountain fire: Historic buildings destroyed in Cape Town (18 Apr 2021)

 

Helen McCrory was 'meteor in our life' says husband Damian Lewis (18 Apr 2021)

more »

 

SF Gate

 

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)

 

Ship traffic, November 1 (30 Oct 2020)

more »


Site feed Updated: 2021-Apr-17 03:00