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

+1-1
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)