You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Java/Encode and Decode TinyURL.java
+2-21Lines changed: 2 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,9 @@
7
7
8
8
```
9
9
/*
10
-
TinyURL is a URL shortening service where you enter a URL such as
11
-
https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk.
10
+
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk.
12
11
13
-
Design the encode and decode methods for the TinyURL service.
14
-
There is no restriction on how your encode/decode algorithm should work.
15
-
You just need to ensure that a URL can be encoded to a tiny URL and the tiny URL can be decoded to the original URL.
12
+
Design the encode and decode methods for the TinyURL service. There is no restriction on how your encode/decode algorithm should work. You just need to ensure that a URL can be encoded to a tiny URL and the tiny URL can be decoded to the original URL.
16
13
*/
17
14
18
15
/*
@@ -35,22 +32,6 @@ public String decode(String shortUrl) {
0 commit comments