LeetCode编程练习
来源:互联网 发布:淘宝漏洞q币充值 编辑:程序博客网 时间:2024/06/02 04:03
题目:
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".
Note:
The vowels does not include the letter "y".
编写一个函数,它以字符串作为输入,只返回字符串的元音。元音不包括字母“y”。
示例1: 输入s = "hello",返回" holle "。
示例2: 输入s = "leetcode ",返回" leotcede "。
思路:
元音字母有五个a,e,i,o,u,大写的也算,当首尾指针所遍历的元素均为元音字母的时候进行交换。
阅读全文
0 0
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode 编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- 欢迎使用CSDN-markdown编辑器
- C语言读书笔记
- Linux查找glibc死机方法
- xUtils(一)-ViewUtils基础用法
- Intellj IDEA光标变成了insert光标状态
- LeetCode编程练习
- 阅读joomla --- php函数使用记录
- 【Swift】UITextField 输入小数点和位数限制
- 设计模式--原型模式(Prototye)
- ZSBK
- 后台请求保证session不失效
- linux, windows, mac, ios等平台GCC预编译宏判断
- 百度地图API自定义标注(自定义覆盖物或自定义图标)
- Git总结