Skip to content

Support custom problem list#60

Draft
NiazSagor wants to merge 6 commits intomasterfrom
support-custom-problem-list
Draft

Support custom problem list#60
NiazSagor wants to merge 6 commits intomasterfrom
support-custom-problem-list

Conversation

@NiazSagor
Copy link
Copy Markdown
Collaborator

This commit introduces a structured way to handle different sets of LeetCode problems, such as the "Blind 75".

Key changes include:

  • Added ProblemSet, ProblemSetFactory, and ProblemSetType to define and manage problem collections.
  • Implemented AssetProblemSetFactory to create problem sets from JSON files stored in the assets directory.
  • Added a new JSON file blind_75.json containing the list of problems for the Blind 75 set.
  • Refactored ProblemsRepositoryImpl to use the new factory pattern for loading a master list of all problems and filtering them based on a selected problem set.
  • Updated getProblems method to accept an optional ProblemSetType to allow fetching specific lists.
  • Injected AssetManager and Gson via a new FactoryModule for Hilt dependency injection.

This commit introduces a structured way to handle different sets of LeetCode problems, such as the "Blind 75".

Key changes include:
- Added `ProblemSet`, `ProblemSetFactory`, and `ProblemSetType` to define and manage problem collections.
- Implemented `AssetProblemSetFactory` to create problem sets from JSON files stored in the assets directory.
- Added a new JSON file `blind_75.json` containing the list of problems for the Blind 75 set.
- Refactored `ProblemsRepositoryImpl` to use the new factory pattern for loading a master list of all problems and filtering them based on a selected problem set.
- Updated `getProblems` method to accept an optional `ProblemSetType` to allow fetching specific lists.
- Injected `AssetManager` and `Gson` via a new `FactoryModule` for Hilt dependency injection.
@NiazSagor NiazSagor marked this pull request as draft January 1, 2026 00:01
This commit introduces the ability to filter problems by predefined sets, such as "Blind 75".

Changes include:
*   Refactoring `ExclusiveProblemSet` to a more generic `PredefinedProblemSet` that uses `SetMetadata`.
*   Creating `PredefinedProblemSetMetadataProvider` to load problem set metadata from a new `predefined_problem_set_manifest.json` asset file.
*   Updating `AllProblemsViewModel` to load problems based on the selected problem set, making the list of problems, tags, and difficulties dynamic.
*   Adding a "Problem Sets" section with `FilterChip`s to the `FilterBottomSheet` in `AllProblemsScreen` to allow users to select a predefined set.
@NiazSagor NiazSagor requested a review from nur-shuvo January 2, 2026 15:54
@NiazSagor
Copy link
Copy Markdown
Collaborator Author

Just brainstorming the design pattern vai. No need to merge or anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant