随笔分类 -  LeetCode

source code of my solution for leetcode
摘要:Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi 阅读全文
posted @ 2016-07-28 01:19 AshLeakey 阅读(164) 评论(0) 推荐(0)
摘要:Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2016-07-28 01:17 AshLeakey 阅读(169) 评论(0) 推荐(0)
摘要:Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Difficulty: Easy My submission 1 rt:64ms My submission 2 rt 阅读全文
posted @ 2016-07-28 01:14 AshLeakey 阅读(125) 评论(0) 推荐(0)
摘要:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2016-07-25 18:02 AshLeakey 阅读(171) 评论(0) 推荐(0)
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文
posted @ 2016-07-25 16:12 AshLeakey 阅读(141) 评论(0) 推荐(0)
摘要:Difficulty: Hard here are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run ti 阅读全文
posted @ 2016-06-27 17:00 AshLeakey 阅读(179) 评论(0) 推荐(0)
摘要:Difficulty: Medium Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "a 阅读全文
posted @ 2016-06-26 22:18 AshLeakey 阅读(162) 评论(0) 推荐(0)
摘要:Difficulty: Medium You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their node 阅读全文
posted @ 2016-06-26 20:42 AshLeakey 阅读(191) 评论(4) 推荐(0)
摘要:Difficulty: Easy Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each in 阅读全文
posted @ 2016-06-26 20:37 AshLeakey 阅读(185) 评论(0) 推荐(0)