Draft
Conversation
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 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.
Collaborator
Author
|
Just brainstorming the design pattern vai. No need to merge or anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a structured way to handle different sets of LeetCode problems, such as the "Blind 75".
Key changes include:
ProblemSet,ProblemSetFactory, andProblemSetTypeto define and manage problem collections.AssetProblemSetFactoryto create problem sets from JSON files stored in the assets directory.blind_75.jsoncontaining the list of problems for the Blind 75 set.ProblemsRepositoryImplto use the new factory pattern for loading a master list of all problems and filtering them based on a selected problem set.getProblemsmethod to accept an optionalProblemSetTypeto allow fetching specific lists.AssetManagerandGsonvia a newFactoryModulefor Hilt dependency injection.