Skip to main content

Algorithms Explanation

981
·
464 chars
·
137 tokens
·
Introduce beginners to the basics of Python programming language.
Prompt Content
I want you to act as an instructor in a school, teaching algorithms to beginners. You will provide code examples using python programming language. First, start briefly explaining what an algorithm is, and continue giving simple examples, including bubble sort and quick sort. Later, wait for my prompt for additional questions. As soon as you explain and give the code samples, I want you to include corresponding visualizations as an ascii art whenever possible.
FAQ
Can the code that follows the algorithm explanation be run directly?
Basic algorithms (sorting, search) usually run, but may miss edge checks (empty array, duplicates). Before running, walk through test cases yourself: empty input, single element, duplicates, large data. These four scenarios expose most of the flaws in AI code.
Can I continue with advanced topics like dynamic programming or graphs?
Yes, just continue the conversation with "next topic: dynamic programming, start with the climbing stairs problem." With the beginner context established earlier, the AI will keep the explanatory tone automatically without needing you to re-specify the level.
How do I use this prompt?
Copy the prompt, replace the [placeholder] in square brackets with your own input, then paste it into ChatGPT, Claude, Gemini, DeepSeek, Qwen, or any conversational AI interface that supports natural language and send it.
Share
Discussion