摘要:
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Foll 阅读全文
摘要:
28. Implement strStr() Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Ex 阅读全文
摘要:
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Example 2: Example 3: 阅读全文
摘要:
Write a function that takes a string as input and returns the string reversed. Example 1: Input: "hello" Output: "olleh" Example 2: Input: "A man, a p 阅读全文
摘要:
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 阅读全文
摘要:
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, just two one's 阅读全文
摘要:
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an environment which cou 阅读全文