Declarative Programming: Cutting code in half

Declarative Programming: Cutting code in half
0

#1

Hello fellow FCC members,

I’m creating this thread because I need help. Whenever I write a solution to an algorithm problem the amount of lines I need/use is a lot higher than the solutions presented in the ‘Hint’ section. I feel like I’m just not getting the point of the challenges. Basically I feel as if I’ve hit a wall when it comes to solving a problem, I have to be verbose and create long and complex solutions using control structures; that unfortunately make more sense to me than the ‘Hint’ solutions. So, I am just wondering if there is anyone who can provide reading material or hints/assistance to get better at solving problems using declarative programming - which many of the ‘Hint’ section solutions have been labeled with.

Thank you in advance,
A keen learner.


#2

In the end, As long as it does the trick, you can be happy, there are tons of people who doesn’t even solve algorithms.

I’m not much more advenced than you, but if my opinion matter, i’d say that practice is the best way to improve. Look for algorithm challanges on the net, and just try to solve a few every days. I think i Remember https://coderbyte.com being quite good, but I haven’t dug in too much, I don’t even remember if it’s free. But there are plenty of Website that can help you.

Also, it may seem weird, but what helped me with algorith were my Logic Courses I had back in college, which is logical, since algorith are logic in the essence. Maybe reading a bit of logic, especially Aristotle’s may help you .


#3

Thank you very much, I will look through your suggested reading now. I have been practicing algorithm challenges on https://www.codewars.com but I will definitely look through coderbyte.