Add Data Structure Restrictions Framework for Progressive Problem Difficulty Evaluation #41
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.
Overview
This PR implements a comprehensive Data Structure Restrictions Framework that defines which data structures and algorithms are appropriate for each lab level. This addresses the issue requesting a way to evaluate problem difficulty and solution intelligence by constraining available tools at different learning stages.
Motivation
The issue asked: "有些课程的题目中会出现还没有学习的内容, 我们是否可以通过要求agent只使用有限的数据结构, 来评估题目的难度?(以及评估llm的智能)"
This framework provides:
What's Included
Core Framework Documentation
DATA_STRUCTURE_RESTRICTIONS.md(4.7 KB) - Main framework specification defining restrictions for each lab level with usage guidelines for problem setters, solvers, and evaluatorsAPPLYING_TO_2022F.md(9.4 KB) - Comprehensive guide for applying the framework to 2022 Fall problems, including:2021F/README.md(5.6 KB) - Overview of the framework with quick reference tables, problem index, and usage examplesADVANCED_LABS_RESTRICTIONS.md(5.3 KB) - Overview of labs 06-10 covering trees, heaps, graphs, and advanced algorithmsLab-Specific Detailed Guides
Each RESTRICTIONS.md file (3.7-12 KB) includes:
Lab Progression:
Example Annotations
Updated 3 existing problem READMEs to demonstrate compliance:
lab_welcome_A: Hash set for O(1) membership checkinglab_02_A: Complexity analysis and algorithm selectionlab_04_C: Linked list manipulation with optimization techniquesMain Repository Integration
Updated root
README.mdwith framework overview section including quick reference table and links to documentation.Example: Progressive Problem Solving
Consider a "find duplicates" problem across different labs:
Lab Welcome (intuitive):
Lab 02 (complexity-aware):
Lab 03 (sorting):
Each approach is valid for its level, demonstrating different concepts and constraints.
Key Features
Progressive Restriction Model
Comprehensive Documentation
Practical Application
Benefits
Validation
✅ Build system verified working (CMake configuration unchanged)
✅ No breaking changes to existing code
✅ All documentation cross-linked and validated
✅ Example problems correctly annotated
Statistics
Target Achievement
✅ "尝试使用尽量少的数据结构来实现题目" - Framework defines minimal structures for each lab level
✅ Problem difficulty evaluation - Clear categorization system provided
✅ LLM intelligence assessment - Constraints enable fair testing with limited resources
✅ 2022 fall problems - Complete application guide ready for use
See
algorithm/2021F/IMPLEMENTATION_SUMMARY.mdfor complete implementation details.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.