← Quiz: Design a URL Shortener: all 10 questions
Quiz: Design a URL Shortener · Question 8 of 10
What is a drawback of creating short codes by hashing the long URL and keeping 7 characters?
What is a drawback of creating short codes by hashing the long URL and keeping 7 characters?
- A.Two different URLs can produce the same code, so collisions must be checked and handled
- B.Hashes cannot be converted to text
- C.It needs a central counter
- D.It only works for HTTPS links
Answer & explanation
Correct answer: Two different URLs can produce the same code, so collisions must be checked and handled
Truncating a hash makes collisions possible.
Can you get the rest right without peeking?
Take the timed Quiz: Design a URL Shortener quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →