top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How tinyurl generates unique code with 6 lettered string ?

+1 vote

Which data structure they will be using and how it generates short url even for each site link with uniqueness ?

posted Jun 22, 2015 by Sachidananda Sahu

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Get a unique random string for the given url and store it in the DB against the URL in the DB. Once it is in the db you just need to fetch the DB and get the original URL to decode.

Check the sample implementation here -

answer Jun 22, 2015 by Salil Agrawal
Similar Questions
+3 votes

I want to add table to the database dynamically through code on runtime. Note: I want to add tables at any point of time.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.