作者归档:在线疯狂

RSS feed of 在线疯狂

[LeetCode]Intersection of Two Arrays II

题目描述:

LeetCode 350. Intersection of Two Arrays II

Given two arrays, write a function to compute their intersection.

Example:
Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].

Note:

  • Each element in the result should appear as ...

继续阅读

[LeetCode]Reverse Vowels of a String

题目描述:

LeetCode 345. Reverse Vowels of a String

Write a function that takes a string as input and reverse only the vowels of a string.

Example 1:

Given s = "hello", return "holle".

Example 2:

Given s = "leetcode", return "leotcede".

题目大意:

编写函数输入一个字符串 ...

继续阅读