Skip to content

Commit 9e8957b

Browse files
refactor 535
1 parent aaa2023 commit 9e8957b

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-1
lines changed

src/main/java/com/fishercoder/solutions/_535.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static class Solution4 {
8888
* Use a random but fixed length encoding
8989
* Analysis:
9090
* 1. This is the most optimal solution so far.
91-
* 2. The number of URLs that can be encoded can be as big as Math.pow((10 + 26*2), FIXED_LENGTH)
91+
* 2. The number of URLs that can be encoded can be as big as Math.pow((10 + 26*2), FIXED_LENGTH), in below code, FIXED_LENGTH = 7
9292
* 3. The length of the shortened URL is fixed at a certain length, which could be a significant reduce for large URLs
9393
* 4. The performance of this scheme is pretty good, due to much smaller probability of encountering collision
9494
* 5. Predicting pattern/encoding isn't possible in this case since random numbers are used.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy