FarMart interview question

Design solution for URL encoding system