随笔分类 -  刷题

摘要:LeetCode第58题: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If 阅读全文
posted @ 2019-05-24 21:30 嘉禾世兴 阅读(197) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: 翻译: 阅读全文
posted @ 2019-05-23 16:47 嘉禾世兴 阅读(168) 评论(0) 推荐(0) 编辑
摘要:LeetCode第38题 The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read 阅读全文
posted @ 2019-05-22 15:31 嘉禾世兴 阅读(392) 评论(0) 推荐(0) 编辑
摘要:LeetCode第28题 Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: 翻译: 返回大字符串 阅读全文
posted @ 2019-05-09 11:41 嘉禾世兴 阅读(157) 评论(0) 推荐(0) 编辑
摘要:LeetCode第27题 Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space f 阅读全文
posted @ 2019-05-08 10:32 嘉禾世兴 阅读(161) 评论(0) 推荐(0) 编辑
摘要:LeetCode第26题 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not alloc 阅读全文
posted @ 2019-05-05 18:48 嘉禾世兴 阅读(258) 评论(0) 推荐(0) 编辑
摘要:LeetCode第21题 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 li 阅读全文
posted @ 2019-05-05 16:58 嘉禾世兴 阅读(232) 评论(0) 推荐(0) 编辑
摘要:LeetCode第20题 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is 阅读全文
posted @ 2018-05-19 20:42 嘉禾世兴 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl 阅读全文
posted @ 2018-05-19 15:47 嘉禾世兴 阅读(116) 评论(0) 推荐(0) 编辑
摘要:LeetCode第13题 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, ju 阅读全文
posted @ 2018-05-19 11:01 嘉禾世兴 阅读(155) 评论(0) 推荐(0) 编辑
摘要:LeetCode第9题 Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Example 2: 阅读全文
posted @ 2018-05-19 10:01 嘉禾世兴 阅读(119) 评论(0) 推荐(0) 编辑
摘要:LeetCode第7题: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an environm 阅读全文
posted @ 2018-05-18 19:28 嘉禾世兴 阅读(187) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示