G-Research Coding Challenge 2019
Rishi Hindocha,  10 February 2020


Every year G-Research, one of DoCSoc’s sponsors, comes to Imperial to host their Coding Challenge - a fast-paced competition where teams of 2-3 battle it out to solve a set of difficult challenges as quickly as possible. As I’m sure you can imagine, it’s a very popular event here, combining problem solving with a healthy dose of competition. This year was no exception with 48 teams participating - the room was packed!

Team-based events like this really test the ability of your group to pull together and combine everyone’s strengths to come out on top, which is fun, rewarding and challenging all at the same time. This year I was joined by Tristan, one of my close friends and coursemates who I participate in all competitions with, and Rob, one of my DoCSoc "family" parents. With two awesome teammates by my side, things were looking good.

After a short introduction explaining what G-Research does and the rules, the competition kicked off. With the clock ticking and a huge array of exciting problems, we quickly got going. This year the challenges were various natural language processing problems, such as evaluating arithmetic expressions and solving equations. Given just how many problems there were, we decided that a divide-and-conquer approach would be best. We’d work on problems independently but we’d help each other if we got stuck. This worked out well as it allowed us to cover a lot of ground quickly, which was going to be important if we wanted to have a shot at winning. Playing to our strengths, I took on unit conversion, Robert handled Roman numerals and Tristan tackled arithmetic expressions and equations.

Attendees tackling the coding challenge
Attendees tackling the coding challenge

We also did a bit of planning beforehand, with all three of us deciding to use Python. Whilst it wasn’t everyone’s preferred language, it meant that we wouldn’t need to flip between languages when helping each other, saving us valuable time. Crucially, when it came to combining solutions, as required by some problems such as arithmetic expression evaluation with Roman numerals, we were able to do so easily. One thing I’ve learnt from various competitions and hackathons is that attention to detail really matters if you want to do well, so it’s always worth taking the time to consider small things like this.

Of course, it wouldn’t be a DoCSoc event without lots of pizza and drinks, generously funded by our society’s sponsors. Unfortunately for us, racing against the clock to solve as many problems as possible meant we didn’t have much time to eat or drink until after the competition. Luckily the excitement and adrenaline kept us going!

We were having so much fun solving the problems the time flew by really quickly. Even though there was a huge leaderboard and countdown projected at the front of the room, we barely had a chance to look at it. This meant that it came as a nice surprise when we saw we were comfortably in second, with ten minutes to go. We were on track to clinch first place with our advanced expression evaluator, however, disaster struck with minutes to go! We had some issues with our submission that we couldn’t fix in time, meaning we couldn’t get our solution in before time was up…

Whilst it was a shame, we still came second! 🥈 We were over the moon with this result, especially given the competition in the room. As we were one of the top three teams, G-Research kindly provided us with prizes, including a really nice rucksack and jacket.

G-Research Coding Challenge prizes
G-Research Coding Challenge prizes

Overall, it was awesome to be able to participate in the G-Research Coding Challenge again. Whilst I wasn’t able to improve on my second place from 2018, it was still a really fun and worthwhile experience. Hopefully it will be third time lucky in 2020 - I can’t wait! 🏆