How do I learn algorithms? [closed]

2020-05-15 00:52发布

Brief History: Just graduated high school, learned a bit of python and C++, have no friends with any helpful computer knowledge at all. Out of anyone I met in my school years I was probably the biggest nerd, but no one really knew. I consider myself to have a vast amount of knowledge on computers and tech then the average person. Built/fixed tons of computers, and ability to troubleshoot pretty much any problem I came across.

Now that high school is over, I've really been thinking about my career. Loving, living computers for the past 13 years of my life I decided to take my ability's and try to learn computer programming, why I didn't start earlier I don't know, seems to be big mistake on my part...

Doing some research I concluded that Python was the first programming language I should learn, since it was high level and easier to understand then C++ and Java. I also knew that to become good at what I did I needed to know more then just 2 or 3 languages, which didn't seem like a big problem considering once I learned the way Python worked, mainly syntax changed, and the rest would come naturally. I watched a couple of youtube videos, downloaded some book pdf's and snooped around from some tutorials here and there to get the hang of what to do.

A two solid weeks had passed of trying to understand the syntax, create small programs that used the basic functions and understanding how it worked, I think I have got the hang of it. It breaks down into what I've been dealing with all this time (although I kinda knew) is that, input, output, loops, functions and other things derived from 0's and 1's storing data and recalling it, etc. (A VERY BASIC IDEA). I've been able to create small programs, Hangman, file storing, temperature conversion, Caeser Cipher decode/encoding, Fibonacci Sequence and more, which I can create and understand how each work.

Being 2 weeks into this, I have learned a lot. Nothing at all compared to what I should be learning in the years to come if I get a grip on what I'm doing. While doing these programs I won't stop until I've done doing a practice problem on a book, which embarrassing enough will take me a couple hour depending on the complexity of it. I absolutely will not put aside the challenge until it's complete, WHICH CAN BE EXTREMELY DRAINING, I've tried most problems without cheating and reached success, which makes me feel extremely proud of my self after completing something after much trial and error.

After all this I have met the demon, algorithms which seem to be key to efficient code. I can't seem to wrap my head around some of the computer codes people put out there using numbers, and sometimes even basic functions, I have been able to understand them after a while but I know there are a lot more complex things to come, considering my self smart, functions that require complex codes, actually hurt my brain. NOTHING EVER IN LIFE HURT MY BRAIN....... not even math classes in highschool, trying to understand some of the stuff people put out there makes me feel like I have a mental disadvantage lol... I still walk forward though, crossing my fingers that the understanding will come with time.

Sorry if is this is long I just wish someone takes all these things into consideration when answering my question. Even through all these downsides I'm still pushing through and continuing to try and get good at this, I know reading these tutorials won't make me any good unless I can become creative and make my own, understand other peoples programs, so this leads me to the simple question I could have asked in the beginning.....

WHERE IN THE WORLD DO I START? I've been trying to find out how to understand some of the open source projects, how I can work with experienced coders to learn from them and help them, but I don't think that's even possible by the way how far people's knowledge is compared to me, I have no friends who I can learn from, can someone help me and guide me into the right direction.. I have a huge motivation to get good at coding, anything information would be extremely helpful.

8条回答
家丑人穷心不美
2楼-- · 2020-05-15 01:31

Where do I start learning algorithms?

I really like Udi Manber's Introduction to Algorithms. Unlike more popular books, say Cormen Leiserson and Rivest, Manber's book focuses on creative problem solving and the process by which algorithms come into being. So instead of reading an encyclopedia of algorithms that other people have invented, and being baffled about where on Earth they came from, you learn to invent algorithms yourself—and along the way you will get to reinvent some of the standard ones you find in encyclopedias.

I think in the long run you will find this kind of problem-solving ability will serve you far better than an encyclopedic knowledge of other people's algorithms.

查看更多
甜甜的少女心
3楼-- · 2020-05-15 01:34

I wont give you many "do-this-do-that" suggestions, but a few things:

  1. You learned Python all by yourself, kudos,esp when nobody around you is doing this.So you have already something to feel good about. Keep leveraging that stuff to grow your knowledge base.

  2. You said you were 13. Python might have books to cater to your level of complexity but definitely not algorithms. Algorithms are serious business. There is a good level of mathematics in and around the domain of algorithms. And there is no way to sugarcoat that. Added to that, books on algorithms are industry wide known as hard to crack books. Ask Bill Gates and Don Knuth.

So I would say, if you want to learn computers because you love learning and yearning for knowledge, then I would suggest, at one side,

You are on the right track, to be frank I dont expect a 13 yr ol kid to know about algos. You are exploring Py, have plans with C,C++ I would say, great!

Strengthen your mathematics. Until unless you want to just implement different kinds of algos, and not scratch deep, you can do it. But algos are not only about that. So if you want to get a hold on it, you need to learn discrete mathematics. Discrete Mathematics wont come to you in 1month, 2months, or even 1 year. Be prepared to wait and bid your time. In the meantime, attack mathematics which is just on the edge of your competency.

Same with algos. Be prepared to visit this domain two or three times in the next five years. Each time you existing knowledge base will better compliment yourpursuit of algorithms.

Till then, Soham

查看更多
趁早两清
4楼-- · 2020-05-15 01:35

First of all...I think you should give yourself some time. Don't get drawn in many things at once learning programming can be a long process. As a first step I would recommend to study the a programming language(like you already do in python), and learn the concepts of programming (oo, recursion, loops, functions , variables etc) as good as you can.

As a second step you should try to answer the question "what exactly do I wanna do with programming?" and this is of course the most important ,it is really different when you do graphics , when you do DSP applications and when you do web development.So learning algorithms in general without having a specific target can be really frustrating sometimes.

So the most important elements can be patience and being focused, after all Rome wasn't built in a day... good luck

查看更多
对你真心纯属浪费
5楼-- · 2020-05-15 01:42

From my experience: problems - will lead you over path you've choosen and languages will help you to look at it from different points of view. If you'll stick to only one or two languages you'll be able to continue, but you'll miss many things on your way, which may help you in future, which may give you some fun etc.
And... There is much more things that you can do besides programming. Don't make "I want to programming" as your primary goal. Use "I want to solve problem ..." and "I want to use programming for doing ...". (i.e. don't make the words be your target)
I think I've choosed this path because it was the easiest thing to do. No need for trainings every day, no need for doing repeatable work, no need to be ready for trip on next day, no need to prepeare bunch of materials and so on. Of course later I found that some of that things can exists even there.

查看更多
Emotional °昔
6楼-- · 2020-05-15 01:45

Well the best solution i can think of is just registering on sites like codeguru.com and look for practices or join programmer groups in your area. That way you can acquire both expirance and knowledge that you will need in future.

查看更多
啃猪蹄的小仙女
7楼-- · 2020-05-15 01:54

good for you.

have you considered some college courses? ususally you can take some algorithm type classes there.

i find that a strong math background is very very helpful, both in problem solving, and basic number manipulation skills. Many of the things you do in programming are based on mathematical foundations. The algorithms you will end up using or creating will be drivin by the types of programs you wish to write.

查看更多
登录 后发表回答