dunpeal's blog

By dunpeal, history, 5 years ago, In English

I'm trying to introduce a friend to competitive programming. He is an engineering student who enjoys the sort of problems we have here on Codeforces, but he did not study CS and is lacking a lot of the basics most of us take for granted. He knows how to program (in Python) but doesn't know a lot of the algorithms 101 topics, such as a strong grasp of computational complexity, sorting algorithms, or even some basic data structures like hashtables and binary trees.

I know some good texts that can help those who have this fundamental knowledge (primarily Laaksonen's book), but what's the best way to introduce someone who lacks any formal CS education?

I'm especially looking for books or websites that he can use by himself.

  • Vote: I like it
  • +93
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +136 Vote: I do not like it
The golden rule of competitive programming
»
5 years ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

As an electrical/electronics engineering student, I think I'm qualified to answer your question. First of all I don't think a formal CS education, which mostly consists of only theoretical courses, is even required to do cp. I started cp because I enjoy doing it and whatever I learnt, I learnt online. There are so many amazing resources like geeksforgeeks, cp-algorithms, cf blogs and great tutorials from youtube.

Coming to how to get started, I started off by doing Long challenge in codechef, which kinda introduced me to stl and now I've been concentrating on cf because of the amazing variety of problems offered. All in all I suggest you ask your friend to start doing cp rather than learn some books because cp is mostly 'learning by doing' more than anything else.

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +7 Vote: I do not like it

    First of all I don't think a formal CS education, which mostly consists of only theoretical courses, is even required to do cp.

    I agree to an extent. There's certainly a ton of material that is very theoretical and doesn't help with competitive programming at all (and arguably any sort of programming or practical skill). But if you lack really basic knowledge (like good understanding of computational complexity, or basic data structures) then you will have a very hard time trying to start CP. CP basically assumes this type of knowledge, and as someone with zero CS exposure, you'd just fail repeatedly without understanding what knowledge you are missing or how to obtain it.

    There are so many amazing resources like geeksforgeeks, cp-algorithms, cf blogs and great tutorials from youtube.

    There's also a ton of mistakes and problems in many of these resources. So many articles on geeksforgeeks are confusing or just plain wrong.

    It's hard to find high quality tutorial resources anywhere.

    On YouTube, I know of Algorithms Live! which is good, but is not a tutorial. Did you ever watch a tutorial video that was actually good, clear, correct, etc?

    • »
      »
      »
      5 years ago, # ^ |
      Rev. 4   Vote: I like it +10 Vote: I do not like it

      Literally the only knowledge required to get started with cp is to know to initialize arrays, write loops and have some knowledge on sorting. Most of the div2A,B can be solved using just this considering one has enough practice. I do agree getting to know of the basic data structures, complexity, stl etc are important even for beginners but learning these while doing has much more impact in the understanding than just learning it with no basic knowledge.

      Coming to resources from youtube, you clearly are not searching well enough if you don't find anything good. Let me list a few:

      1. mycodeschool: Probably has the best data structure tutorial i can find in the internet.
      2. Gaurav sen: Has amazing explanations to many complex algorithms.
      3. Errichto: Lot of competitive coding lectures ranging from easy to hard topics and surely a must know channel if you're into cp.
      4. CodeNCode: I found him recently, and really loved his style of explaining and he has a playlist for almost every topic. I would surely recommend him for anyone starting with cp.
»
5 years ago, # |
Rev. 2   Vote: I like it -25 Vote: I do not like it

I'm trying to introduce a friend to competitive programming.

Please don't. Don't waste your friend's time. Your friend has lots of stuff to learn about being an Engineer already. Time is too precious to waste on unnecessary stuff.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Try getting all sports fans, or fans of anything, to not share their interests. It's only natural for people to share what they like, and if others want to do it too or not, they can do as they please.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +12 Vote: I do not like it

    Whenever there exists some stupid or irrelevant or rude comment in a blog, why does it always have to be yours?

»
5 years ago, # |
  Vote: I like it +95 Vote: I do not like it

What the fuck is wrong with this community? The author asked a perfectly fine question even with info that Laaksonens' book is there but maybe there's a better way for someone without CS background. This should actually be an example of how to ask questions and instead, it's downvoted.

The CS background isn't necessary as many people start with CP in high school. This means that you can just search for all the "how to start with CP" questions and tutorials.

CPH is a very good choice, along with solving easiest problems in Atcoder Beginner Contests and Leetcode (which is very python-friendly).

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +53 Vote: I do not like it

    I literally typed "How to" in the search bar and found this: https://codeforces.net/blog/entry/16599 https://codeforces.net/blog/entry/49157 https://codeforces.net/blog/entry/23054

    Maybe you just got used to helping people that don't try to help themselves.

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it -20 Vote: I do not like it

      What are you trying to say with your links? That questions like "how to start" or "how to practice" are already answered? Sure. But OP asked a unique question "what about lack of CS background" and maybe a good answer would be "go through some cs course like one from MIT". He didn't know that and searching wouldn't likely help him. I still think that the question was perfectly fine and the answer is "CS background isn't necessary so follow any how-to-start CP" advice.

      • »
        »
        »
        »
        5 years ago, # ^ |
          Vote: I like it +25 Vote: I do not like it

        Wow, now I'm downvoted. Sure, just someone please explain to me MetB's comment. Or tell me why it's stupid to have a conversation about starting CP without cs background.

        • »
          »
          »
          »
          »
          5 years ago, # ^ |
            Vote: I like it +16 Vote: I do not like it

          Because you don't need CS background when starting CP.

          • »
            »
            »
            »
            »
            »
            5 years ago, # ^ |
              Vote: I like it +12 Vote: I do not like it

            So the question "what should I do if X?" is stupid if the answer is "X doesn't change anything"?

            • »
              »
              »
              »
              »
              »
              »
              5 years ago, # ^ |
                Vote: I like it +21 Vote: I do not like it

              It is not in general but the case is, "How does one start CP if (s)he has no CS background" kinda sounds like "How does one buy food if the fridge is empty", since X here is an obvious factor and everyone assumes the beginner has no CS background. Even if that's not obvious for the beginner himself, trying to find previous similar topics, I'm sure, would lead to about the same blogs I mentioned, where no previous knowledge is presumed. As I said, most likely people ask without properly trying to find answers themselves.

              • »
                »
                »
                »
                »
                »
                »
                »
                5 years ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                I would say that most of beginners in CP already know programming / CS.

»
5 years ago, # |
  Vote: I like it +91 Vote: I do not like it

it's stupid that the blog starts getting upvotes because of errichto's comment. people can't really think for themselves, they need a grand master as their Shepard.

»
4 months ago, # |
  Vote: I like it +11 Vote: I do not like it

I am a Bachelor of Commerce student who transitioned to computer science through self-study. I was introduced to CodeChef by my brother, and after finding a challenging problem, I became hooked. The rest is history.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is interesting. Can you tell us more about your journey? How you practiced, how you made time among all your academic studies, what hurdles you faced etc.?

    TIA!

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I was already out of college when I started coding. In fact, I have changed 3 careers finally choosing computer science.