
leeCode
Bugger终结
这个作者很懒,什么都没留下…
展开
-
LeeCode(2) Add Two Numbers C语言 版本
题目: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 digit. Add the two numbers and retu...原创 2019-05-24 13:34:32 · 207 阅读 · 0 评论 -
LeeCode(1) two sum C语言 C++版本
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 same e...原创 2019-05-23 14:58:07 · 134 阅读 · 0 评论 -
LeeCode(3) Longest Substring Without Repeating Characters C语言
题目:Given a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3.Example 2:Inp...原创 2019-05-25 14:02:56 · 178 阅读 · 0 评论 -
LeeCode(4) Median of Two Sorted Arrays C语言版本
题目: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+n)).You may assume nums1 and...原创 2019-05-26 13:00:07 · 173 阅读 · 0 评论 -
LeeCode(5) Longest Palindromic Substring C语言
题目: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” is also a valid answer.Exam...原创 2019-05-27 16:40:02 · 195 阅读 · 0 评论 -
Leecode(8) String to Integer (atoi) C语言
题目: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. Then, starting from ...原创 2019-05-31 14:12:07 · 161 阅读 · 0 评论 -
LeeCode(9) Palindrome Number C语言
题目:Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplana...原创 2019-06-01 13:34:38 · 171 阅读 · 0 评论 -
LeeCode(6) ZigZag Conversion C语言
题目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 for better legibility)P A H NA P L S I ...原创 2019-05-29 17:30:11 · 119 阅读 · 0 评论 -
LeeCode(234) Palindrome Linked List C语言
题目:Given a singly linked list, determine if it is a palindrome.Example 1:Input: 1->2Output: falseExample 2:Input: 1->2->2->1Output: trueFollow up:Could you do it in O(n) time and ...原创 2019-06-03 13:48:27 · 186 阅读 · 0 评论