无分类 28. Implement strStr() Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
无分类 66. Plus One Given a non-empty array of digits representing a non-negative integer, plus one to the integer.
无分类 83. Remove Duplicates from Sorted List Given a sorted linked list, delete all duplicates such that each element appear only once.
无分类 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word in the string.
无分类 69. Sqrt(x) Compute and return the square root of x, where x is guaranteed to be a non-negative integer.
无分类 38. Count and Say The count-and-say sequence is the sequence of integers with the first five terms as following:
无分类 53. Maximum Subarray Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
java 986-区间列表的交集 给定两个由一些闭区间组成的列表,每个区间列表都是成对不相交的,并且已经排序。 返回这两个区间列表的交集。 形式上,闭区间 [a, b](其中 a <= b)表示实数 x 的集合,而 a <= x <= b。两个闭区间的…
java 985-查询后的偶数和 给出一个整数数组 A 和一个查询数组 queries。 对于第 i 次查询,有 val = queries[i][0], index = queries[i][1],我们会把 val 加到 A[index] 上。然后,第 i 次查询的答案是 A 中偶数值的和。 (此处给定的 in…