As a developer, one of the best ways to improve your problem-solving skills is to stay consistent with platforms like LeetCode. However, it’s easy to lose focus or get distracted with other browsing activities. That’s why I built a Chrome extension that holds you accountable to your daily coding goals.
In this blog post, I'll walk you through how this extension works, key features, and the technical aspects behind it. Let’s dive into it!
This Chrome extension is designed to keep you on track with solving LeetCode problems. It automatically redirects you to an unsolved problem from Striver's DSA sheets each time you open a new tab. The extension tracks your daily progress and ensures you reach your coding goal before browsing freely.
Here’s what it offers:
The problems used in the extension are pulled from Striver’s DSA sheets, which I scraped using Puppeteer. These sheets are categorized into beginner, intermediate, and expert levels, and each problem comes with a LeetCode link.
The extension stores data like your daily progress, selected DSA sheet, and current problem marker in Chrome's local storage. The structure for this data is something like this:
type StorageData = {
striver191ProbsMarker: number,
striverDSAbegineerMarker: number,
striverExpertProbsMarker: number,
dailyGoal: number,
DSA_Sheet: string,
extensionEnabled: boolean,
problemsSolved: number,
flag: boolean,
};
Each time the extension is installed or activated, default values are set. As you solve problems, the progress is updated, and you can always access or change the settings via the popup interface.