摘要:
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e 阅读全文
摘要:
题目:Determine whether an integer is a palindrome. Do this without extra space. 思路: 1.利用leetcode #7 的reverse(int x) 2.详见code 代码:思路2 C++ 参考: https:/ 阅读全文
摘要:
题目:https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi to convert a string to an integer. 思路: 把情况搞清楚就好了。 代码:C++: int myAtoi(string st 阅读全文
摘要:
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 without repeating characters. For example, the longest substring without repeating letter 阅读全文
摘要:
题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppin 阅读全文
摘要:
题目: Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat", 阅读全文
摘要:
题目: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators 阅读全文