IncredibleThings

导航

2016年5月18日 #

LeetCode-Remove Linked List Elements

摘要: Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 Return: 1 --> 2 --> 3 --> 4 --> 5 /** * Definition for singly... 阅读全文

posted @ 2016-05-18 06:00 IncredibleThings 阅读(121) 评论(0) 推荐(0) 编辑

LeetCode-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 sum of the squares ... 阅读全文

posted @ 2016-05-18 05:23 IncredibleThings 阅读(141) 评论(0) 推荐(0) 编辑

LeetCode-Valid Palindrome

摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama" is a palindrome. "race a car" is not a pal... 阅读全文

posted @ 2016-05-18 04:18 IncredibleThings 阅读(146) 评论(0) 推荐(0) 编辑