Ad
  • Custom User Avatar

    I envisioned a solution like this:
    take the size HashMap<longUrl, shortUrl>, this size will be the ordinal number of the long URL. Through transformation base10to26 I get a short URL.
    But with this conversion for the number 17576 in base10 form, I get the number 1000 in base26 form.
    This works if you use a larger base(like base62), but it doesn't work for base26.
    Please, help me, is this the right solution or I need to use a completely different solution?