摘要: 3Sum ClosestJan 18 '12Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. For example, given array S = {-1 2 1 -4}, and target = 1. The... 阅读全文
posted @ 2013-01-27 14:06 西施豆腐渣 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Word SearchApr 18 '12Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.For 阅读全文
posted @ 2013-01-27 09:48 西施豆腐渣 阅读(141) 评论(0) 推荐(0) 编辑