The Wayback Machine - https://web.archive.org/web/20230605170258/https://practice.geeksforgeeks.org/problems/painting-the-fence3727/1