Java(submit result is TLE)Anyone can help me?哪位中国大佬帮忙看看


  • 0
    R

    我知道很多国人,谁帮我看看?
    i don't know why my codes can't be submited?
    the submit result is Time Limit Exceeded(TLE).

    class Solution {
    public String reverseString(String s) {
    String r = "";
    for(int i = s.length(); i > 0; i--){
    r += s.toCharArray()[i-1];
    }
    return r;
    }
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.