08 2016 档案
摘要:Determine whether an integer is a palindrome. Do this without extra space. Solution:
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi
阅读全文
摘要: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 would have ex
阅读全文
摘要:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of
阅读全文
摘要:Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans
阅读全文