leetCode题解
来源:互联网 发布:钱咖试客类似的软件 编辑:程序博客网 时间:2024/04/28 04:11
leetcode题解
(1)题目:
Given an input string, reverse the string word by word.
For example,
Given s = “the sky is blue”,
return “blue is sky the”.
使用java实现代码:
package leetcode;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class onecode {
public static void main(String[] args) throws IOException
{
BufferedReader strin=new BufferedReader(new InputStreamReader(System.in));
System.out.print(“请输入一个字符串:”);
String str = strin.readLine();
String array[]=str.split(” “);
String printout=”“;
for(String item:array)
{
printout=item+” “+printout;
}
System.out.println(printout);
}
}
- leetcode题解
- leetcode题解
- LeetCode 题解
- leetCode题解
- leetcode题解
- leetcode题解
- leetcode题解
- LeetCode题解
- LeetCode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- Leetcode题解
- JAVA gc垃圾回收机制
- YTU:C语言习题 矩形法求定积分
- MyReport实践:为ERP系统添加打印功能
- [LeetCode] Validate Binary Search Tree
- 移动硬盘打不开,提示“文件或目录损坏无法读取”
- leetCode题解
- Windows 10 配置vagrant环境
- 设计模式--创建型(2)
- new与malloc的10点区别
- OpenCV中GPU模块的使用
- android-利用broadcast双程序相互监控保证目标程序运行
- android基础——Build.VERSION.SDK_INT
- 如何下载各版本Chrome的离线安装包
- ural 1144. The Emperor's Riddle