Discover your dream Career
For Recruiters

I used ChatGPT to solve my hedge fund HackerRank problem. It didn't go well

Last week I wrote an article on the issues I faced during my interview for a major hedge fund. Since then, I've thought about my experience with their testing approach and started asking myself if I should have availed myself of all the tools at my disposal to pass the test.

The test problem itself was (I paraphrase): 'Solve the following problem: Given an array A with N elements, find the number of all subsets of array A where the sum of all the elements in the subset is divisible by K'

This weekend, I went to OpenAI.com and simply asked it to write c# code to solve that problem. A couple of seconds later, the following answer was given out.

I quickly checked the result for correctness by passing it the first few powers of 2 in the array (as in: arr = {1,2,4,8). and k =2). The subsets are just all the binary numbers you can make with 4 bits and that number of 2^4 or 16. Of these, 8 are even (0,2,4,6,8,10,12,14). The code gives the answer 6 , which is incorrect.

I encourage my Software development course students to use such technology to learn from the best. I also warn them that they need to use the results from AI tools to learn and, most importantly, understand the solution to a problem. I tell them to check, always check the answer provided to you. 

This is where having candidates who understand the problem and the solution can prove their worth in gold. Though the chatbot can provide you with an answer, you still need to be able to check and make sure the answer makes sense and is correct.

Not being able to do so makes you a essentially a high-tech parrot.

Today, in the age of Chat GPT-4 I would have to add that, if you want to use an AI Bot, be clear to state your intentions, and always CHECK the answer. Being able to carry out that last step is what will separate the competent candidates from those less so. 

In my area, research, and teaching, ChatGPT and the likes will be amazing tools. They will help produce code much faster and help create repositories of codes and applications. Those, hopefully after having been curated, will then be used by the AI to improve itself!

Using such tools is not considered cheating to me. It is just the next evolutionary step for software development in the same way that I went from writing code in a text editor to now using a tool like Visual Studio 2022 which uses AI in the form of Intellicode to suggest and sometimes write entire lines of code for me.

Click here to create a profile on eFinancialCareers. Comment ANONYMOUSLY on articles and make yourself visible to recruiters hiring for top jobs in technology and finance. 

Have a confidential story, tip, or comment you’d like to share? Contact: alex.mcmurray@efinancialcareers.com in the first instance. 

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

author-card-avatar
AUTHORGus Rose Insider Comment

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.

Boost your career

Find thousands of job opportunities by signing up to eFinancialCareers today.
Recommended Articles
Recommended Jobs

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.