Directly return the given String got passed and beat 90%+


  • 1
    C

    Maybe this question should restrict more.

    // Encodes a URL to a shortened URL.
        public String encode(String longUrl) {
            return longUrl;
        }
    
        // Decodes a shortened URL to its original URL.
        public String decode(String shortUrl) {
            return shortUrl;
        } 
    

Log in to reply
 

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