The findings suggest that current LLMs cannot fully automate question generation and time complexity problem solving, however, they can substantially support the process and reduce the workload for educators.
Abstract
The time complexity of algorithms is a critical concept in computer science and engineering, and it is recognized as a fundamental topic in the Association for Computing Machinery (ACM) curricular recommendations. In alignment with these guidelines, numerous universities worldwide incorporate this topic into their introductory computer science courses, which typically have large student enrollments annually. Consequently, there is an increasing demand for automation in both instructional and assessment processes. This study explores the potential of Large Language Models (LLMs) to assist teaching staff in generating source code segments with predefined time complexity and determining the time complexity of given code segments, with applications in educational and examination contexts. We proposed a novel methodology for LLM evaluation in the aforementioned context and evaluated three prominent LLMs: ChatGPT, Gemini, and Llama, on their ability to generate and analyze C code segments exhibiting linear, logarithmic, quadratic, and exponential time complexities. A framework was developed to automate the prompt and segment generation and time complexity determination using two mainstream prompt engineering methods: zero-shot and chain-of-thought, and assessed the differences in code generation and time complexity analysis. A total of 960 generated segments were assessed on the correctness of time complexity, structural appropriateness, and suitability for exam use. The results suggest that ChatGPT is the most suitable LLM for generating segments with predefined time complexity (success rate goes up to 61%). All LLMs yielded the best results in generating linear segments, while exponential complexity posed the greatest challenge overall. A subset of generated segments was extracted to evaluate the time complexity determination capabilities. All three LLMs were asked to find the time complexity of each extracted segment. The most accurate LLM is ChatGPT (79.6%). We also assessed how good each LLM is in determining the time complexity of segments generated by itself. Llama outperforms others in that task (83% of successful determinations) when the zero-shot prompt method is used. The findings suggest that current LLMs cannot fully automate question generation and time complexity problem solving. However, they can substantially support the process and reduce the workload for educators.
A comparative analysis of six LLMs for generating formative feedback on introductory Java programs containing predefined defects under controlled conditions reveals substantial cross-model variation, particularly in multi-defect scenarios.
Melina Najimi, Saba Yazdani, Marzieh Ahmadzadeh· Proceedings of the Canadian...· 0 citations
A dataset of 271 C++ student solutions to eight OOP examination problems is introduced, together with the problem statements and the reference grades produced by the university auto-grader, indicating that agreement with a reference is an insufficient basis for choosing a local grading model, and that compliance, deter...
Adrian-Gabriel Diaconu, Alexandru Guzu, A. Ulmămei· Electronics· 0 citations
This research investigates the possibility of replacing junior and intermediate programmers with artificial intelligence (AI)-based tools in the code generation process. To inspect the capabilities of these tools, the Qwen Coder tool was used to conduct the tests. The methodology used in the study is based on 10 tests,...
M. Pantilică, Corina Ene· Economic Insights: Trends an...· 0 citations
This study compares the structural quality of code produced by three widely adopted vibe coding tools --- Lovable, v0, and Replit --- starting from a single generation prompt and suggests that choosing between vibe coding tools involves structural trade-offs that go beyond perceived productivity.
Background and Context. Large Language Models (LLMs) have become widely accessible to students in introductory programming courses [1], yet limited research evaluates their performance on authentic assignments with pedagogical constraints such as restricted language features and course-specific conventions. Existing be...
Iris Xu, Michał Nowak, E. Shaffer· Proceedings of the 2026 ACM...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.