摘要:
题目: 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 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: 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: 阅读全文