码迷,mamicode.com
首页 >  
搜索关键字:determine    ( 2744个结果
[LeetCode] Happy Number
Happy Number Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the ...
分类:移动开发   时间:2015-04-22 13:55:28    阅读次数:141
LeetCode - Happy Number
Happy Number2015.4.22 12:39Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Startin...
分类:移动开发   时间:2015-04-22 13:31:17    阅读次数:137
202. Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:移动开发   时间:2015-04-22 13:20:50    阅读次数:104
Linked List Cycle——LeetCode
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?题目大意:给定一个链表,判断是否有环?解题思路:解法一:快慢指针,如果有环,那么快慢...
分类:其他好文   时间:2015-04-22 11:29:06    阅读次数:116
Happy Number——LeetCode
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:移动开发   时间:2015-04-22 11:11:21    阅读次数:171
[LeetCode] Valid Parentheses
Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" an...
分类:其他好文   时间:2015-04-21 20:46:55    阅读次数:128
关于leetcode中游戏相关的几道题。
碰到的第一个题就是九宫格的问题, Valid Sudoku   determine if a Sudoku is valid, according to: http://sudoku.com.au/TheRules.aspx The Sudoku board could be partially filled, where empty cells are fille...
分类:其他好文   时间:2015-04-21 18:12:06    阅读次数:134
Path Sum Total Accepted: 50216 Total Submissions: 168425
题目来自于leetcode https://leetcode.com/problems/path-sum/ Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the ...
分类:其他好文   时间:2015-04-21 18:05:43    阅读次数:156
leetcode_125题——Valid Palindrome(string,比较常规思路)
Valid PalindromeTotal Accepted:48909Total Submissions:221328My SubmissionsQuestionSolutionGiven a string, determine if it is a palindrome, considering...
分类:其他好文   时间:2015-04-20 23:54:15    阅读次数:224
LeetCode 9 Palindrome Number 回文数字
题目:Determine whether an integer is a palindrome. Do this without extra space. 翻译:判断一个数字是否是回文数,不要额外空间。 解题思路:因为数字既然传过去了,就不会有越界的问题。每次只需要取最前面和最后面的那一位数字进行比较,相同则继续,不同则返回、 首先要获取数字的位数,假设数字是12344321,一共有8位。 ...
分类:其他好文   时间:2015-04-20 17:09:41    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!