摘要:
编写一个函数,以字符串作为输入,反转该字符串中的元音字母。 示例 1: 输入: "hello"输出: "holle"示例 2: 输入: "leetcode"输出: "leotcede" 链接:https://leetcode-cn.com/problems/reverse-vowels-of-a-s
阅读全文
posted @ 2020-04-14 00:55
cocobear9
阅读(219)
推荐(0)
摘要:
public static void main(String[] args) { //1.字符数组 转换成 字符串 //(1)直接在构造String时转换 char[] array = new char[] {'a','b','c','d','e','f','g'}; String str = ne
阅读全文
posted @ 2020-04-14 00:38
cocobear9
阅读(2908)
推荐(0)
摘要:
首先,我们来回顾下C语言中的swap函数设计 传值:不能从根本上交换两数 #include <stdio.h> void swap(int a, int b) { int temp; temp = a; a = b; b = temp; } 传引用:在C语言中,应该称地址 #include <std
阅读全文
posted @ 2020-04-14 00:30
cocobear9
阅读(3393)
推荐(0)