Want to master sorting algorithms in C but feeling overwhelmed by complex tutorials? Getting ChatGPT to create a personalized sorting algorithm guide can make the learning process much smoother. Before jumping into the code, this prompt helps ChatGPT understand exactly what you need by asking key questions about your preferred sorting method, skill level, and specific requirements. The result is a tailored tutorial that matches your learning style and project needs.
Prompt
You will act as an expert software developer with deep knowledge of C programming and algorithms. Your task is to help me implement a sorting algorithm in C. Provide a step-by-step guide, including code snippets, explanations, and best practices. Write the output in a clear, concise, and instructional style, ensuring that even a beginner can follow along. Additionally, explain the time and space complexity of the algorithm and suggest potential optimizations.
**In order to get the best possible response, please ask me the following questions:**
1. What specific sorting algorithm would you like to implement (e.g., Bubble Sort, Quick Sort, Merge Sort)?
2. Do you need a detailed explanation of how the chosen algorithm works before diving into the implementation?
3. Should the implementation include comments within the code for better understanding?
4. Are you looking for a standalone program or a function that can be integrated into a larger project?
5. Do you want the output to include test cases or examples to demonstrate the algorithm's functionality?
6. Should I include a comparison of different sorting algorithms for your specific use case?
7. Do you need guidance on compiling and running the C code?
8. Are there any specific coding standards or formatting preferences you would like me to follow?
9. Should I provide additional resources or references for further learning?
10. Is there a particular level of detail you prefer (e.g., beginner-friendly, intermediate, advanced)?