teej_dv sneakily wins coding challenge held on ThePrimeagen's channel within 25 seconds

Software and Game Development is a separate category on Twitch (Image via Sportskeeda)
Software and Game Development is a separate category on Twitch (Image via Sportskeeda)

The coding competition on ThePrimagean's Twitch channel, featuring teej_dv, roxkstar74, and bashbunni, proved more than worth the hype, with all sorts of hilarity going down in the livestream.

Streamer teej_dv returning the same value for the function he took in the URL Shortener challenge was probably one of the most discussed incidents after the clip of the same went viral.

The fact that the creator's trickery went unnoticed at the time made it all the more hilarious and outrageous for various viewers. Read on to find out more about what was probably the biggest coding contest on Twitch.


How did teej_dv complete the URL shortener challenge in 25 seconds?

(Watch from 02:08:12 to check the full URL Shortener challenge)

About two hours into the stream, Primagean introduced another challenge for the competitors:

"Tinyurl is a URL shortening service where you put in a URL...and it returns a short URL such as this (points at examples). Design a class to encode a URL and decode a tiny URL."

He also clarified that there are no real restrictions as to how the streamers will go about it and that they are free to complete the challenge as they see fit:

There are no restrictions on how your encode and decode algorithms should work. You just need to ensure that the URL can be encoded to a tiny URL and it can be decoded back to the original URL.

After clarifying all the rules of the challenge, Primagean also remarked that the key to winning the challenge lies in the language the programmers get for it:

"I'm just saying like it totally depends on the language I get. It's just a function of how fast I can Google these answers, right?"

After the randomizer assigned languages to everyone, teej_dv celebrated getting PHP, the language most suited to this challenge.

"It's my time to shine."

The main time-consuming aspect of this challenge would be constructing the encoding and decoding side of things. However, teej_dv skipped this aspect as he directly wrote the code for the program to return the same value it passed.

This essentially meant that the streamer put in the desired result as the source value to get the result he wanted.

The contest was being held on Leetcode, an online coding practice software, which did not check for the presence of the decode encode algorithms, it only checked that the result was what the algorithms would have provided.


Fans react to teej_dv using a shortcut during ThePrimagean's contest

Viewers seemed to be divided, with some who felt that teej_dv found a legitimate loophole in the challenge and used it to win, and another section felt he blatantly cheated.

Most viewers felt that it was on the developers of Leetcode to do better while creating these challenges.

teej_dv is a NeoVim core developer who mostly streams when working on open source stuff. Despite coding streams still being a very niche part of Twitch, the coder has made a name for himself with his innovative plugins and core feature development.

Quick Links

App download animated image Get the free App now