题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. [28] Implement strStr() LeetCode
题目 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 for another array, you must do this by modifying the input array in-place with O(1) extra memory. The order of elements can be changed. It doesn’t matter what you leave beyond the new length. [27] Remove Element LeetCode
题目 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 space for another array, you must do this by modifying the input array in-place with O(1) extra memory. [26] Remove Duplicates from Sorted Array LeetCode
题目 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. Example: Input: 1->2->4, 1->3->4 Output: 1->1->2->3->4->4 [21] Merge Two Sorted Lists LeetCode
题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered valid. [20] Valid Parentheses LeetCode
题目 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 "". Example 1: Input: [“flower”,“flow”,“flight”] Output: “fl” [14] Longest Common Prefix LeetCode
题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 [13] Roman to Integer LeetCode
题目 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:** true **Example 2:** **Input:** -121 **Output:** false **Explanation:** From left to right, it reads -121\. From right to left, it becomes 121-. Therefore it is not a palindrome. **Example 3:** **Input:** 10 **Output:** false **Explanation:** Reads 01 from right to left. Therefore it is not a palindrome. **Follow up:** Coud you solve it .... [9] Palindrome Number LeetCode