Evaluating the performance of GPT-4o and Gemini 1.5 Pro on algorithms and data structure cod- ing problems

The advent of advanced Large Language Models (LLMs) like GPT-4o and Gemini 1.5 Pro demonstrates significant potential for enhancing problem-solving in coding. This master’s thesis provides a quantitative comparison of these two models, focusing on their performance in solving algorithmic and data structure problems while exploring their reasoning capabilities through experimental research. The study adopts a quantitative approach, presenting the models with a diverse set of coding problems sourced from LeetCode, an online platform for coding challenges. Each solution is rigorously evaluated through unit testing to determine correctness and by measuring execution time to assess efficiency. This comprehensive method offers insights into the models’ problem-solving effectiveness and computational efficiency. The findings reveal that GPT-4o outperformed Gemini 1.5 Pro in problemsolving ability, particularly in handling complex algorithmic tasks. However, Gemini 1.5 Pro demonstrated slightly better efficiency, achieving marginally lower execution times on average. Both models significantly outperformed human programmers in efficiency, producing more optimized solutions. These results highlight the potential of LLMs like GPT-4o and Gemini 1.5 Pro to address specific coding challenges effectively, paving the way for their broader application in computational problem-solving.

Publication Details

Journal
KTH Publication Database DiVA (KTH Royal Institute of Technology)
Published
2025-01-01
Primary Topic
Laser-Plasma Interactions and Diagnostics
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluating the performance of GPT-4o and Gemini 1.5 Pro on algorithms and data structure cod- ing problems

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Laser-Plasma Interactions and Diagnostics
article

Evaluating the performance of GPT-4o and Gemini 1.5 Pro on algorithms and data structure cod- ing problems

article en

Abstract

The advent of advanced Large Language Models (LLMs) like GPT-4o and Gemini 1.5 Pro demonstrates significant potential for enhancing problem-solving in coding. This master’s thesis provides a quantitative comparison of these two models, focusing on their performance in solving algorithmic and data structure problems while exploring their reasoning capabilities through experimental research. The study adopts a quantitative approach, presenting the models with a diverse set of coding problems sourced from LeetCode, an online platform for coding challenges. Each solution is rigorously evaluated through unit testing to determine correctness and by measuring execution time to assess efficiency. This comprehensive method offers insights into the models’ problem-solving effectiveness and computational efficiency. The findings reveal that GPT-4o outperformed Gemini 1.5 Pro in problemsolving ability, particularly in handling complex algorithmic tasks. However, Gemini 1.5 Pro demonstrated slightly better efficiency, achieving marginally lower execution times on average. Both models significantly outperformed human programmers in efficiency, producing more optimized solutions. These results highlight the potential of LLMs like GPT-4o and Gemini 1.5 Pro to address specific coding challenges effectively, paving the way for their broader application in computational problem-solving.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Quality Education
Openalex Percentile: Top 32%
Laser-Plasma Interactions and Diagnostics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Evaluating the performance of GPT-4o and Gemini 1.5 Pro on algorithms and data structure cod- ing problems · KTH Publication Database DiVA (KTH Royal Institute of Technology) (2025) | TGRS Research Map | TGRS