Friday, January 16, 2026

ChatGPT is right here – Use that to cease asking LeetCode questions throughout interviews · Ponderings of an Andy


Introduction

I’ve interviewed a whole lot of software program engineers in search of a brand new place. I’ve talked with school college students in search of
an internship, junior engineers simply getting began, employees engineers in search of a brand new function, managers and administrators to
lead these groups. In each a kind of interviews, I might advised the candidate that I hate puzzle questions (ie.
“What number of home windows are in Seattle?”) and I hate LeetCode type questions.

It seems that ChatGPT is sweet at fixing these issues.

Good. Possibly that may kill LeetCode interview questions as soon as and for all. There are such a lot of higher methods to find out if an
engineer is the appropriate match.

ChatGPT vs LeetCode

Now we have quickly banned ChatGPT over on Stack Overflow, as a result of it could actually and does present subtly incorrect solutions.
It has been so unhealthy that we known as up two new moderators from the earlier election as we speak. One in all my mod colleagues supplied some
context
round this as we speak too.

We get just a few hundred CGPT flags per day, resulting in tons of and even hundreds of submit deletions per day. There’s usually one flag per person (not accounting overlap from a number of customers), however every flag can result in anyplace between a pair and tens of deletions per person.

LeetCode, nonetheless, checks your reply instantly. They do not have the identical drawback as Stack Overflow. I wished to see simply how good
this new chatbot was, and took it for a spin towards a random LeetCode drawback.

I randomly chosen a medium issue drawback with a 58% acceptance price. My sufferer query:
1143. Longest Widespread Subsequence

Getting began

Step one in passing this take a look at, is deciding on the whole immediate, copying it and pasting it immediately into LeetCode’s UI. I did not learn
the immediate and I did not format it. Only a blind copy and paste. I additionally supplied one instruction:

Present python code

Press enter and wait 30 seconds or so.

The response

Inside seconds I used to be supplied this block of code

def longestCommonSubsequence(text1: str, text2: str) -> int:
    # Convert text1 and text2 to lists of characters
    s1 = record(text1)
    s2 = record(text2)

    # Initialize the dynamic programming desk
    n = len(s1)
    m = len(s2)
    dp = [[0] * (m + 1) for _ in vary(n + 1)]

    # Fill the dynamic programming desk
    for i in vary(1, n+1):
        for j in vary(1, m+1):
            if s1[i-1] == s2[j-1]:
                dp[i][j] = dp[i-1][j-1] + 1
            else:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1])

    # Return the size of the longest frequent subsequence
    return dp[n][m]

It likes the phrase “dynamic programming desk”. Together with this code, it even explains its reasoning for going this route. Possibly
our intrepid AI can train a junior dev a brand new trick or two whereas doing this puzzle.

ChatGPT explains its algorithm

Then it reveals that assessments cross…very confidently.

All of the assessments handed, so this implementation is appropriate

The consequence

I am making an attempt to indicate that ChatGPT can do that, so at this level I have never learn the prose above. I copy and pasted the code it returned
and clicked “Submit”.

I waited just a few seconds for all assessments to run and obtained my outcomes.

ChatGPT beats over 96% of other implementations in runtime performance and 71% in memory performance

ChatGPT crushed this. It performs higher than 96% of different submissions when it comes to run time efficiency. It makes use of much less reminiscence than 71% of
different submissions.

Can we please cease utilizing LeetCode now?

The full time it took to carry out this take a look at was below 5 minutes. I randomly chosen an issue, copy and pasted the immediate, waited for a response
from the chatbot, copy and pasted the code response, waited for the assessments to run. Full.

As a hiring supervisor, I might have wasted my time and the candidates time having them do that drawback now. As a substitute, we will discuss
an precise drawback they are going to be fixing. We will do an actual world drawback as a substitute this. There are higher methods to interview an engineer
and I am hoping ChatGPT makes that abundantly clear to hiring managers in all places.

We’ll must adapt our hiring processes, however that is a great factor. My latest expertise reveals that at most corporations, it is unhealthy anyway.
Now now we have a chance to shine some daylight on it and make it higher.

Within the meantime, in the event you proceed to make use of LeetCode or one thing just like consider your candidate’s technical abilities, your are doing all of your
crew an enormous diservice. Candidates learn about this device, they usually know that the best technique to get an interview is to play the sport. There
have been tens of hundreds of layoffs within the tech business within the final six months. I guarentee candidates are in search of each benefit they will
get, to maneuver to their subsequent function.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles