Leetcode
Leetcode
Joy CR
欢迎关注我的公众号: 小秋的博客
https://blog.csdn.net/xiaoqiu_cr
https://github.com/crr121
https://segmentfault.com/u/chenrong_flying
联系邮箱:rongchen633@gmail.com
展开
-
1071. Greatest Common Divisor of Strings
\1071. Greatest Common Divisor of Strings Easy 30985Share For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more times) Return the largest stri...原创 2020-03-12 22:49:41 · 252 阅读 · 0 评论 -
9. Palindrome Number
Palindrome Number Easy Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 O...原创 2020-02-09 15:48:37 · 284 阅读 · 0 评论 -
8. String to Integer (atoi)
String to Integer (atoi) Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found....原创 2020-02-09 12:59:27 · 283 阅读 · 0 评论 -
7. Reverse Integer
文章目录Reverse IntegersolutionAlgorithm Reverse Integer Easy Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3...原创 2020-02-04 15:14:54 · 191 阅读 · 0 评论 -
4. Median of Two Sorted Arrays
Median of Two Sorted Arrays Hard There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+...原创 2020-02-03 12:51:40 · 200 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is...原创 2020-02-03 12:12:54 · 169 阅读 · 0 评论 -
2. Add Two Numbers
2. Add Two Numbers Medium 59971568Share You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single...原创 2020-02-02 17:38:25 · 248 阅读 · 0 评论 -
1.tow sum
文章目录题目c++版本java版本利用hashmap正确做法 题目 Two Sum 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 input would have exa...原创 2020-02-02 15:10:14 · 221 阅读 · 0 评论 -
5. Longest Palindromic Substring
5. 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. Example 1: Input: "babad" Output: "bab" Note: "aba"...原创 2019-08-15 16:44:53 · 190 阅读 · 0 评论 -
64. Minimum Path Sum
64. Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move eithe...原创 2019-08-14 16:04:17 · 168 阅读 · 0 评论 -
337House Robber III
337. House Robber III The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the root, each house has one and only one pare...原创 2019-08-13 17:32:33 · 222 阅读 · 0 评论 -
213. House Robber II
213. House Robber II You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That mean...原创 2019-08-13 17:32:56 · 167 阅读 · 0 评论 -
198. House Robber
198. House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is t...原创 2019-08-13 17:33:10 · 157 阅读 · 0 评论 -
150逆波兰式
文章目录150.Evaluate Reverse Polish NotationSolution 150.Evaluate Reverse Polish Notation Medium Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. ...原创 2019-08-13 17:33:49 · 219 阅读 · 0 评论 -
Valid Perfect Square
1、题目Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as sqrt. Example 1: Input: 16 Return...原创 2018-05-11 16:00:31 · 158 阅读 · 0 评论 -
Word Pattern
1、题目Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Ex...原创 2018-05-11 14:56:23 · 120 阅读 · 0 评论 -
Merge Two Sorted Lists
1、题目Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1-&g...原创 2018-04-19 17:12:27 · 99 阅读 · 0 评论 -
Valid Parentheses
1、题目Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of b...原创 2018-04-19 16:13:12 · 101 阅读 · 0 评论 -
Two Sum
1、题目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 exactly one solution, and you may not use the sam...原创 2018-04-19 15:14:31 · 111 阅读 · 0 评论