摘要: ###原题目```cppMerge 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 lis 阅读全文
posted @ 2020-01-01 21:30 Yekko 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ###原题目```cppGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is 阅读全文
posted @ 2020-01-01 21:28 Yekko 阅读(114) 评论(0) 推荐(0) 编辑
摘要: ###原题目```cppWrite a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty strin 阅读全文
posted @ 2020-01-01 21:24 Yekko 阅读(100) 评论(0) 推荐(0) 编辑
摘要: ###原题目将I V C M 诸如此类的罗马数字输入后,转换成数字输出。```cppExampleSymbol ValueI 1V 5X 10L 50C 100D 500M 1000 Example 1: Input: "III"Output: 3Example 2: Input: "IV"Outp 阅读全文
posted @ 2020-01-01 21:22 Yekko 阅读(121) 评论(0) 推荐(0) 编辑
摘要: ####原题目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 h 阅读全文
posted @ 2020-01-01 21:19 Yekko 阅读(56) 评论(0) 推荐(0) 编辑
摘要: KMP详细解释 basic algorithm 前言 自己在做leetcode的时候,遇到了一道字符串匹配的问题,开始的时候用的是c++中的自带库以及定制操作find,而后在讨论区看到了KMP算法,遂去了解,但是没想到这个算法对我来说,如此晦涩难懂,今天终于算是有了个一知半解,所以将其写下来。 KM 阅读全文
posted @ 2019-03-31 16:30 Yekko 阅读(360) 评论(0) 推荐(0) 编辑