随笔分类 -  LeetCode

算法很重要
摘要: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 @ 2017-08-15 16:08 binryang 阅读(119) 评论(0) 推荐(0)
摘要:The string 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 for better legibi 阅读全文
posted @ 2017-08-13 14:47 binryang 阅读(89) 评论(0) 推荐(0)
摘要:Longest Palindromic Substring Given a string s , find the longest palindromic substring in s . You may assume that the maximum length of s is 1000. Ex 阅读全文
posted @ 2017-07-18 15:39 binryang 阅读(86) 评论(0) 推荐(0)
摘要:Problem Determine whether an integer is a palindrome. Do this without extra space. "click to show spoilers." Code public boolean isPalindrome(int x) { 阅读全文
posted @ 2017-07-14 09:40 binryang 阅读(103) 评论(0) 推荐(0)
摘要:Problem Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = 123, return 321 "click to show spoilers." Note: The input is assumed 阅读全文
posted @ 2017-07-14 09:22 binryang 阅读(115) 评论(0) 推荐(0)
摘要:Problem Given a string, find the length of the longest substring without repeating characters. Examples: Given , the answer is , which the length is 3 阅读全文
posted @ 2017-07-10 15:40 binryang 阅读(109) 评论(0) 推荐(0)
摘要:Problem You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of their node 阅读全文
posted @ 2017-07-09 14:41 binryang 阅读(134) 评论(0) 推荐(0)
摘要:Problem: 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 input woul 阅读全文
posted @ 2017-07-07 13:44 binryang 阅读(122) 评论(0) 推荐(0)