摘要: 题目: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: hay 阅读全文
posted @ 2020-03-19 17:21 好麻烦快点 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array nums and a value val, remove all instances of that value in-placeand return the new length. Do not allocate extra space for another 阅读全文
posted @ 2020-03-19 17:16 好麻烦快点 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra 阅读全文
posted @ 2020-03-19 17:13 好麻烦快点 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题目: 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. Exam 阅读全文
posted @ 2020-03-19 17:06 好麻烦快点 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if 阅读全文
posted @ 2020-03-19 17:02 好麻烦快点 阅读(89) 评论(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 "". Ex 阅读全文
posted @ 2020-03-19 16:52 好麻烦快点 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 题目: Roman numerals are represented by seven different symbols: I, V, X, L, C, Dand M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, t 阅读全文
posted @ 2020-03-19 15:31 好麻烦快点 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 题目: 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: 阅读全文
posted @ 2020-03-19 00:12 好麻烦快点 阅读(86) 评论(0) 推荐(0) 编辑