Jessica Brown Posted Tuesday at 09:51 AM Posted Tuesday at 09:51 AM 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! 😊 CodeName: Jessica 💻 Linux Enthusiast | 🌍 Adventurer | 🦄 Unicorn 🌐 My Site | 📢 Join the Forum
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now