LeetCode Reverse String

来源:互联网 发布:双11淘宝最迟发货时间 编辑:程序博客网 时间:2024/05/22 05:13

Description:

Write a function that takes a string as input and returns the string reversed.

Solution:

学一下用法~~~


public class Solution {public String reverseString(String s) {return new StringBuilder(s).reverse().toString();}}


0 0
原创粉丝点击