---
title: "Discussion on \"A Tale of Debugging: The Competitive Programmer Approach\" | Hashnode"
description: "Discussion on \"A Tale of Debugging: The Competitive Programmer Approach\". Have the computer find the bugs for you..."
url: "https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A Tale of Debugging: The Competitive Programmer Approach](https://albexl.hashnode.dev/a-tale-of-debugging-the-competitive-programmer-approach?utm_source=hashnode&utm_medium=feed)

Have the computer find the bugs for you...

Feb 19, 2023 · 12 min read · albexl.hashnode.dev  
Updated Mar 21, 2023  
Read the article

-   [#debuggingfeb](https://hashnode.com/tag/debuggingfeb)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#python](https://hashnode.com/tag/python)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)

## Written by

[Alberto Gonzalez](https://hashnode.com/@albeXL)

@albeXL · Gothenburg, Sweden

  
[View profile](https://hashnode.com/@albeXL)

Software Developer at doWhile | Computer Scientist | ICPC World Finalist | EN | ES

Computer Scientist from the University of Havana with experience in Software Development and a passion for Competitive Programming and Algorithms. Writing about the topics I know whenever I can. Coding in Python and C++ lately.

## Responses 12

Markdown supported · ⌘↵ to post

[Mahmoud Eid](https://hashnode.com/@kiraomn)

[Mar 5, 2024](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/65e7a155965a84f7780926f3)

thank you for sharing the knowledge♥

[Alessandro](https://hashnode.com/@anger)

[Mar 26, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/64202daf3fa6f95ced3dc908)

This is one of the best articles I have read in some time, brings me back to the TC days.

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Mar 26, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/64202daf3fa6f95ced3dc908#reply-64203087df7f026515a619de)

Glad you enjoyed it.

I made part II which is a little bit more technical. You can read it here: [albexl.hashnode.dev/a-tale-of-debugging-the-compe…](https://albexl.hashnode.dev/a-tale-of-debugging-the-competitive-programmer-approach-part-ii)

It is about taking this approach to a whole new level by making an actual tool to stress test solutions.

It would be great to have your feedback about it too.

[Eric Pérez Torres](https://hashnode.com/@ericperez)

[Feb 26, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63fbe43442967b0d40d3775d)

Great Article!!!

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 27, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63fbe43442967b0d40d3775d#reply-63fc7210a13f5e02f6799e0d)

Glad you enjoyed it ❤

[Yanoel Llano Boitel](https://hashnode.com/@YagamiL)

[Feb 25, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f9d17a478545fd8f77c664)

Great content!

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 25, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f9d17a478545fd8f77c664#reply-63f9e385478545fd8f77c936)

Thanks teammate!

[Jeffrey Onuigbo](https://hashnode.com/@jeffreyon)

[Feb 25, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f9ca4a3a72c6fdf234783e)

This is such an unusual approach to debugging and it's so great. Thanks for sharing man

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 25, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f9ca4a3a72c6fdf234783e#reply-63f9cb9c3a72c6fdf234789c)

You are welcome!

I'm planning on creating an extended version of this article with an approach that supports solutions in different programming languages. Let me know if it seems like a good idea.

Also, it would be great to do it as a community, so feel free to reach me on github if you want to collaborate with this: [github.com/albexl](https://github.com/albexl)

[Ketan Mate](https://hashnode.com/@KetanM)

[Feb 22, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f57c96f338bec1cf2ded07)

Awesome read! Thanks for sharing!

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 22, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f57c96f338bec1cf2ded07#reply-63f5bb8275350fc1ff691f89)

Glad you enjoyed it ❤️

[Swati Sarangi](https://hashnode.com/@starCodes)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f4fec2f338bec1cf2de15c)

Excellent write-up and too useful! Thanks for sharing it with the community. I have bookmarked it for reference and will let you know about my experience by applying it. This post is relatable to me because of the language used, i.e Python. Being a competitive coding enthusiast, I hope that this trick will help me to speed up my debugging process.

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f4fec2f338bec1cf2de15c#reply-63f52d2075350fc1ff691396)

It will help you for sure. Give it a try and let me know how it goes.

[Vikas Singh](https://hashnode.com/@vikas732002)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f48499f338bec1cf2dcaea)

GOOD

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 25, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f48499f338bec1cf2dcaea#reply-63f9ccf13a72c6fdf2347905)

THANKS

[Malavi Pande](https://hashnode.com/@Malavi)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f427a83c8949b64ddccd2b)

I know that something happen inside a computer while we practice coding in the leetcode and hacker rank but this explanation is next level. Thank you Alberto such a great explanation !!!

The problem with the first approach is it is giving you the expected value index but not which where it first appear so that's why we introducing the variable to keep the track of the index if duplicates exist!!

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f427a83c8949b64ddccd2b#reply-63f46aef91a509b61ed031b3)

You know someone actually reads your article when they answer your questions in it. Thank you, for reading and answering!

I plan on making an article explaining some interesting and non-conventional usages of binary search. Let me know if it sounds like a good idea.

[Malavi Pande](https://hashnode.com/@Malavi)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f427a83c8949b64ddccd2b#reply-63f4f65875350fc1ff690de4)

[Alberto Gonzalez](https://hashnode.com/@albeXL) Sounds super exiting go a head

[Victoria Lo](https://hashnode.com/@victoria)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f425ef3c8949b64ddcccf3)

This is super insightful! Thanks for sharing [Alberto Gonzalez](https://hashnode.com/@albeXL)!

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Feb 21, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f425ef3c8949b64ddcccf3#reply-63f464b83c8949b64ddcd4b4)

My pleasure

[Carlos R. González Jiménez](https://hashnode.com/@cranza)

[Feb 19, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f291049a615a95ce2edbd5)

When you told me about the idea you had, I thought it was excellent, but seeing it written exceeded all my expectations. Articles like this confirm the wisdom of sharing knowledge, many people throughout the world encounter these problems every day, and here you show them an alternative solution

[Feb 19, 2023](https://hashnode.com/posts/a-tale-of-debugging-the-competitive-programmer-approach/63f268d0e20f289c69fddb97/comment/63f291049a615a95ce2edbd5#reply-63f291d32c58e0959fd7cdfc)

I'm glad you liked it and found it useful. I agree that sharing the knowledge we carry is something that has the capacity to move worlds. Therefore, I do it as often as I can.
