Analyzing Prominent LLMs: An Empirical Study of Performance and Complexity in Solving LeetCode Problems

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Guimaraes, Everton, Nascimento, Nathalia, Shivalingaiah, Chandan, Nelapati, Asish
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866909724032630784
author Guimaraes, Everton
Nascimento, Nathalia
Shivalingaiah, Chandan
Nelapati, Asish
author_facet Guimaraes, Everton
Nascimento, Nathalia
Shivalingaiah, Chandan
Nelapati, Asish
contents Large Language Models (LLMs) like ChatGPT, Copilot, Gemini, and DeepSeek are transforming software engineering by automating key tasks, including code generation, testing, and debugging. As these models become integral to development workflows, a systematic comparison of their performance is essential for optimizing their use in real world applications. This study benchmarks these four prominent LLMs on one hundred and fifty LeetCode problems across easy, medium, and hard difficulties, generating solutions in Java and Python. We evaluate each model based on execution time, memory usage, and algorithmic complexity, revealing significant performance differences. ChatGPT demonstrates consistent efficiency in execution time and memory usage, while Copilot and DeepSeek show variability as task complexity increases. Gemini, although effective on simpler tasks, requires more attempts as problem difficulty rises. Our findings provide actionable insights into each model's strengths and limitations, offering guidance for developers selecting LLMs for specific coding tasks and providing insights on the performance and complexity of GPT-like generated solutions.
format Preprint
id arxiv_https___arxiv_org_abs_2508_03931
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Analyzing Prominent LLMs: An Empirical Study of Performance and Complexity in Solving LeetCode Problems
Guimaraes, Everton
Nascimento, Nathalia
Shivalingaiah, Chandan
Nelapati, Asish
Software Engineering
Large Language Models (LLMs) like ChatGPT, Copilot, Gemini, and DeepSeek are transforming software engineering by automating key tasks, including code generation, testing, and debugging. As these models become integral to development workflows, a systematic comparison of their performance is essential for optimizing their use in real world applications. This study benchmarks these four prominent LLMs on one hundred and fifty LeetCode problems across easy, medium, and hard difficulties, generating solutions in Java and Python. We evaluate each model based on execution time, memory usage, and algorithmic complexity, revealing significant performance differences. ChatGPT demonstrates consistent efficiency in execution time and memory usage, while Copilot and DeepSeek show variability as task complexity increases. Gemini, although effective on simpler tasks, requires more attempts as problem difficulty rises. Our findings provide actionable insights into each model's strengths and limitations, offering guidance for developers selecting LLMs for specific coding tasks and providing insights on the performance and complexity of GPT-like generated solutions.
title Analyzing Prominent LLMs: An Empirical Study of Performance and Complexity in Solving LeetCode Problems
topic Software Engineering
url https://arxiv.org/abs/2508.03931