Abstract
This paper compares the performance of different AI models (GPT-4o, Gemini 2.0, GPT o3-mini, Grok, and LLAMA) in solving programming problems on the Leetcode platform. The study assessed the accuracy, speed, and ability of the models to handle complex cases. The study identified the strengths and weaknesses of each model, as well as issues with the accuracy of calculations. The results of the study demonstrate the importance and features of using GenAI in teaching programming, but also indicate the need to develop critical thinking and student independence. Recommendations for optimizing educational tasks taking into account the use of GenAI are proposed.