LLM Prompts

Code Explanation and Documentation

Prompts for explaining code functionality and generating documentation.

The method

Use this method to get clear explanations of code. Provide the code snippet and ask for step-by-step breakdown, commenting, or documentation generation.

The prompts

Prompt 1
Explain this code step by step and add comments: [CODE]
Prompt 2
Generate comprehensive documentation for this function: [CODE]
Prompt 3
Break down this algorithm and explain its time complexity: [CODE]