Posted January 7Jan 7 Build a URL shortener that converts a long URL into a short one and allows users to retrieve the original URL from the shortened version. Basic Requirements: Accept a long URL as input and return a shortened URL. Store the mapping between the long and short URLs. Accept a shortened URL as input and return the original long URL. Bonus Features: Use a hashing algorithm to generate the short URL. Add error handling to check if the input URL is valid. Implement file-based persistence so the mapping is saved between runs. Example Output: Enter a long URL: https://codenamejessica.com/forums/forum/9-programming-challenges Short URL: https://short.ly/abcd1234 Enter a short URL: https://short.ly/abcd1234 Original URL: https://codenamejessica.com/forums/forum/9-programming-challenges This challenge helps with string manipulation, data storage, and URL validation — a fun and practical project! 😊
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.