2014年12月4日

Letter Combinations of a Phone Number

摘要: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... 阅读全文

posted @ 2014-12-04 13:28 code#swan 阅读(93) 评论(0) 推荐(0)

Construct Binary Tree from Preorder and Inorder Traversal

摘要: Given preorder and inorder traversal of a tree, construct the binary tree./** * Definition for binary tree * struct TreeNode { * int val; * Tr... 阅读全文

posted @ 2014-12-04 13:27 code#swan 阅读(100) 评论(0) 推荐(0)

Jump Game II

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文

posted @ 2014-12-04 13:24 code#swan 阅读(83) 评论(0) 推荐(0)

Sudoku Solver

摘要: Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on... 阅读全文

posted @ 2014-12-04 13:21 code#swan 阅读(190) 评论(0) 推荐(0)

Spiral Matrix

摘要: Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],... 阅读全文

posted @ 2014-12-04 13:11 code#swan 阅读(131) 评论(0) 推荐(0)

导航