AlgoMaster Logo

Encode and Decode TinyURL

operations=[["encode","https://example.com"],["encode","https://google.com"],["decode","0"],["decode","1"]]
0 / 19
operationsencode(https://example.com)encode(https://google.com)decode(0)decode(1)
algomaster.io
Step:Codec keeps a hash map from a numeric key to the long URL