arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.15770cs.SEcs.AI
收藏

关于LLM解决Leetcode问题的性能评估

Performance Review on LLM for solving leetcode problems

Duke University(杜克大学);University of California San Diego(加利福尼亚大学圣迭戈分校);University of Amsterdam(阿姆斯特丹大学);Johns Hopkins University(约翰斯·霍普金斯大学);Simon Fraser University(西蒙菲莎大学);Northeastern University(东北大学)

Lun Wang, Chuanqi Shi, Shaoshui Du, Yiyi Tao, Yixian Shen, Hang Zheng, Yanxin Shen, Xinyu Qiu

AI总结:

本文全面评估了GPT-4和GPT-3.5-turbo等大型语言模型在解决Leetcode编程挑战中的表现,采用pass@k指标分析正确性与效率,揭示了其在代码生成与自动化编程辅助中的优势与局限。

摘要:

本文对大型语言模型(LLM)在解决Leetcode(广泛用于算法练习和技术面试的平台)编程挑战中的表现进行了全面评估。我们首先抓取Leetcode网站,收集了涵盖不同难度和主题的多样化问题集。利用此数据集,我们使用包括GPT-4和GPT-3.5-turbo(ChatGPT-turbo)在内的多个LLM生成解决方案。对生成的解决方案在正确性和效率上进行了系统评估。我们采用pass@k指标评估在给定尝试次数内的成功率,并分析了解决方案的运行时性能。结果突出了当前LLM在代码生成和问题解决任务中的优势与局限,为其在自动化编程辅助中的潜在应用和改进领域提供了见解。

英文摘要:

This paper presents a comprehensive performance evaluation of Large Language Models (LLMs) in solving programming challenges from Leetcode, a widely used platform for algorithm practice and technical interviews. We began by crawling the Leetcode website to collect a diverse set of problems encompassing various difficulty levels and topics. Using this dataset, we generated solutions with multiple LLMs, including GPT-4 and GPT-3.5-turbo (ChatGPT-turbo). The generated solutions were systematically evaluated for correctness and efficiency. We employed the pass@k metric to assess the success rates within a given number of attempts and analyzed the runtime performance of the solutions. Our results highlight the strengths and limitations of current LLMs [10] in code generation and problem-solving tasks, providing insights into their potential applications and areas for improvement in automated programming assistance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑