More intermediate algorithm scripting challenges

currently halfway through the intermediate algorithm scripting, however I only completed a few of the questions without looking at finished solutions. I’m looking for more practice on the subject are there other sites/ books/ etc ,etc that have similar difficulty to the one asked in the intermediate algorithm scription section?

Unfortunately, the “I ended up having to look at the solution” problem is a common one. You will learn a lot more coming up with your own solution, even if it takes a while and it is ugly. After you solve it, looking at how others solved it can be a great thing.

How to get better? It takes time and practice. Learn to pseudo code, learn to talk out an algorithm without specifics of that language - I would often go to algorithm meetups where people from different coding languages would talk out there solutions without any confusion - algorithms are processes that are not tied to any language.

There are web sites like leetcode that will give you algorithm challenges. After you solve it, you can see how others solved it. There are youtube videos of people solving challenges and talking through it. There are books on algorithm theory. Cracking the Coding Interview with some good problems and solutions.

And don’t worry about it too much. A lot of it is getting comfortable with certain little tricks and ideas. After a while you develop a “spidey sense”. But it takes time. And it’s not the most important thing. People like to stress it because it is easy to test and it is “sexy”. Teaching people to write clean, DRY code is probably more important but harder to teach. And some jobs don’t use many algorithms - I think in 4 years, I’ve only done half a dozen non-trivial algorithms, and those weren’t that tough. Some jobs do a lot. Where they will come up is on job interviews and they are a good way to train your coder brain. But don’t freak out if they take a while to get down - that’s normal.

3 Likes

If you’re looking for more practice, I suggest going back and doing the challenges again without looking at solutions. You’ve gone through with just copying, so you should feel comfortable with the syntax, but you need to struggle through the problem solving process to really build up those mental muscles.

2 Likes

Yup, totally agree that you should go back and complete tasks without copying the anlwers. Reading the code is actually a separate skull from writing code, and reading answers doesn’t really help you learn how to write answers, unfortunately.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.