iamgood1's blog

By iamgood1, history, 5 years ago, In English

Hi, I have been "reading" algorithms and know some c++ as well. But, I can't implement algorithms even after getting a correct solution. It seems very difficult to even implement n*n grid solutions and graph algorithms(even if I know the correct algorithm) What to do to improve "implementation" skills?

  • Vote: I like it
  • 0
  • Vote: I do not like it

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

probably you just need to code more.

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

Try doing A and B problems from div2 contests

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

Read solutions of other users.

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

Probably, I'm in the exact same situation as yours. ;( Code a lot of Div 2A and 2B problems .Because if you can't solve anything in infinite time, you won't in limited time contests either. Do try some other OJ's too if you are having a hard time here.Keep practicing.

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

work hard and code more...all these things will come with time and practice. Open a2oj start doing div2 A and then div2 b and so on you will definetly see the difference.

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

I don't think anybody understood.. It's like I know the algorithm is BFS with some twist(and it's the efficient one) I can't get enough confidence to code it..

@Wish_Performer, whose are simple?

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

    first learn all the stl and its features in c++. without it u will find implementation hard. and second thing try to see other's coder which are at the top, they are most beautiful and will help u a lot in self learning. they will give u many tricks to implement short. do this for 50 question for div 2 a,b and and 50 questions of div 3 c,d . u will get comfortable with implementation. second thing, remove fear of implementation, it will obstacle u. and if u don't have confidence u can't do anything, petr said once. and working hard doesn't mean work for 24 hrs, it mean try until u succeed.

    tip : i learned segment tree by seeing other's code.