2013年10月6日

Algorithms - Priceton - 02 - 3-Sum

摘要: 3-Sum : Given N distinct integers, how many triples sum to exactly zero?---------------------------------------------------------------------------------------3-Sum : brute-force algorithm O(N3)---------------------------------------------------------------------------------------3-Sum : sorting-bas 阅读全文

posted @ 2013-10-06 21:32 haoyancoder 阅读(133) 评论(0) 推荐(0)

Algorithms - Priceton - 01 - Dynamic Connectivity & Union Find

摘要: Connected components : Maximal set of objects that are mutually connected.Find query : Check if two objects are in the same component.Union command : Replace components containing two objects with their union.------------------------------------------------------------------------------------------- 阅读全文

posted @ 2013-10-06 15:48 haoyancoder 阅读(192) 评论(0) 推荐(0)

导航