antivenom's blog

By antivenom, 9 years ago, In English

Hello everyone,after few months in CP.I have realized some flaws in me.Whenever I try to learn something I face difficulty in converting pseudo code into working code in language(say C++).It is not that i don't know C++.I have decent knowledge.But when it comes to converting what I have learnt I face difficulty.I always search for exact code which I feel comfortable and because of this Many thing I get deprived off.It will be really helpful if anybody could guide me.Thanks

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

| Write comment?
»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

you don't have to solve the problem in pseudo code first , I think if you learn to solve the problem in c++ without using pseudo code you'll become better and faster and when you read pseudo code just understand the way or the main idea of the solution. finally this is something needs time to be good in it so don't read it once ,read it many times it's normal and happens with every one , after a period of time you'll be better :) and sorry for my bad English

»
9 years ago, # |
Rev. 2   Vote: I like it +2 Vote: I do not like it

If I understood the problem correctly, I had the same issues as you.
When I was learning basic algorithms and data structures years ago,
I struggled with implementation, and found that reading actual code is much much easier for me to learn something.

My advice would be as follows:

  1. I personally do not see anything wrong with learning through code, as long as you do understand the procedures (algorithms) properly.
  2. Once you have a grasp on a particular algo/ds, return to the context/pseudo code and read them again. You should find them much simpler to understand now.
  3. Discuss with your friends/teachers. They might have a better perspective towards it.
  4. Experience. Given you've only spent a few months in CP, I'd say this is normal.
    Once you have enough knowledge in your pocket, I believe this won't be an issue for you anymore.

Hope this helps.