Skip to content

期末考:0622-1114405056-尤靖崵 - #1332

Open
d14405056-tech wants to merge 7 commits into
DevSecOpsLab-CSIE-NPU:mainfrom
d14405056-tech:0622-1114405056-Final
Open

d14405056-tech wants to merge 7 commits into
DevSecOpsLab-CSIE-NPU:mainfrom
d14405056-tech:0622-1114405056-Final

Conversation

@d14405056-tech

Copy link
Copy Markdown

This pull request adds complete solutions, documentation, and test suites for two assignments: "資料清理" (Data Cleaning) and "二分搜尋與線性搜尋的比較分析" (Binary Search vs Linear Search). For each problem, the submission includes a well-documented implementation, comprehensive tests (including intentional failure cases), and detailed logs and instructions. The binary search task also features a radar chart visualization for multi-dimensional comparison.

A. 資料清理 (Data Cleaning):

  • Implementation and Documentation:
    • Added solution.py implementing order-preserving deduplication, divisibility filtering (D=4), sorting, and formatted output, with extensive docstrings and comments.
    • Provided README.md with problem description, algorithm explanation, complexity analysis, sample cases, and usage instructions.
    • Included AI_LOG.md documenting the development process, requirements, interface, edge cases, and acceptance criteria.
  • Testing:
    • Added test_solution.py with several test cases, including a purposely failing test to demonstrate red/green test states.

B. 二分搜尋與線性搜尋的比較分析 (Binary Search vs Linear Search):

  • Implementation and Documentation:
    • Added solution.py implementing both search algorithms, performance measurement with timeit, and result formatting, with detailed docstrings.
    • Provided README.md with problem breakdown, complexity analysis, radar chart dimension explanation, sample outputs, and usage.
    • Included AI_LOG.md with a thorough log of requirements, design decisions, edge case handling, and function signatures.
    • Added plot.py to generate a radar chart comparing the two algorithms across five normalized dimensions, saving the output as assets/radar.png.
  • Testing:
    • Added test_solution.py with tests for large and custom arrays, and for the presence/absence of the search target.

Key changes by theme:

資料清理 (Data Cleaning):

  • Implemented deduplication, divisibility filtering, and sorting logic in solution.py, with clear comments and edge case handling.
  • Created comprehensive test suite, including an intentional failure case, in test_solution.py.
  • Added detailed documentation and AI interaction log in README.md and AI_LOG.md. [1] [2]

二分搜尋與線性搜尋 (Binary Search vs Linear Search):

  • Implemented both search algorithms, performance comparison, and result reporting in solution.py.
  • Developed radar chart visualization in plot.py for multi-dimensional algorithm comparison, with automated output to assets/radar.png.
  • Provided extensive documentation, logs, and a robust test suite in README.md, AI_LOG.md, and test_solution.py. [1] [2] [3]

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