You are not logged in. Please login at www.codechef.com to post your questions!

×

How to understand/learn algorithms?

1
2

I'm very confused. I really don't know where to start from. People are saying "Learn Algorithms", "Practice" and stuff. But, the problem is that I'm new to competitive programming and I don't really understand what algorithms are. What will I practice, then? Is there a faster way to learn? At least, just the basics. The problem is that I have very less time(just 4 days) for a contest(codechef based private contest). Anyway, can you provide relevant information(or, a link to it)?

I don't know if this is important or no: But, the language I want to code in is C++. I'm not basically a novice in it, in fact I know it sufficiently enough. Just the problem is I don't know much about algorithms.

asked 18 Aug '14, 18:50

kartikeyp's gravatar image

2★kartikeyp
16112
accept rate: 0%


Unfortunately you can't learn much about algorithms in just 4 days. The best thing you can do right now is learn about STL. It has many data structures and algorithms already implemented.

link

answered 18 Aug '14, 18:57

neo1tech9_7's gravatar image

6★neo1tech9_7
8.5k51538
accept rate: 19%

if you want you can have a look here it's brilliant for starting off.It will surely take time to get a grip of it but the rewards are breath-taking :)

http://discuss.codechef.com/questions/48877/data-structures-and-algorithms

link

answered 18 Aug '14, 20:43

zargus's gravatar image

2★zargus
17662136
accept rate: 0%

Okay.. Thanks for the help.

(19 Aug '14, 08:19) kartikeyp2★

First of all don't hurry in becoming good at it. It would be a big mistake. I made the same mistake two years ago, got frustrated and left it. Now i started all over again(bcoz i started missing it & can't be without it), right from basics(DS: LL,Trees,Graph) & will slowly move to DP & Algos.

Try solving easy ones. Try for 2-3 hours, if not then discuss/see tutorial/solutions. Keep practicing easy ones then move to medium levels. Read editorials,try your self then read code of others as much as u can(but after you have given a decent try). Slowly you will start becoming good at it. It may take time but depends on how much involvement is there from your side. And Meditate regularly! Improves focus & intuition, which improves logic/maths.

For inspiration, there are many but best i know is : http://www.geeksforgeeks.org/top-college-top-talent-yes-anudeep-cracks-google-1-44cr-package/

link

answered 19 Aug '14, 10:16

vickywiz's gravatar image

2★vickywiz
914
accept rate: 0%

Quite comprehensive. Thanks for the help.

(19 Aug '14, 10:44) kartikeyp2★

try this website http://algorithm.daqwest.com/ i hope this will be helpfull....

link

answered 19 Aug '14, 10:17

grvana's gravatar image

1★grvana
152212
accept rate: 5%

This one was really helpful! Thanks.

(19 Aug '14, 20:18) kartikeyp2★

Competitive programming is like a sport. There is never a shortcut. There is nothing of the sorts where u have a wishlist of algorithms that u can master in merely 3-4 days. In so less time u can just practice random stuff or any specific weak area that you might have. Apart from that i'm sorry to say there is nothing much to help you out. It doesn't matter even if you are an expert in C or C++. At the end of the day what matters is the logic that you come up with.

link

answered 18 Aug '14, 20:00

edorado93's gravatar image

4★edorado93
5515
accept rate: 50%

Thanks. I'll try learning whatever I can, and just focus on getting a feel of the competition.

(19 Aug '14, 20:20) kartikeyp2★

Try this book for algorithm -
Introduction of Algorithm - Thomas H. Cormen .

link

answered 19 Aug '14, 16:25

rajat_dtc's gravatar image

2★rajat_dtc
1.8k51422
accept rate: 6%

Its hard to read a book at this stage. Anyway, Thanks for Answering.

(19 Aug '14, 20:18) kartikeyp2★

bt still in case you want to follow this book you can refer to this blog http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/

(19 Aug '14, 22:34) grvana1★

and one most important thing as u have time constraint jst be active on codechef you will learn lot of things which one can not do in a month..... best people are here to help and a lot of study material is available.... im jst following it and yes im lovin it.... happy coding... ...grv...

link

answered 19 Aug '14, 22:38

grvana's gravatar image

1★grvana
152212
accept rate: 5%

1

Okay, I'll be active. Thanks, and Same to You. :)

(20 Aug '14, 19:14) kartikeyp2★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,739
×1,919
×1,664
×200
×71

question asked: 18 Aug '14, 18:50

question was seen: 5,183 times

last updated: 20 Aug '14, 19:14