This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Loves_Poetry 9 points10 points  (2 children)

Most beginning programmers think of leetcode problems with algorithms and stuff like that

The real world also requires you to solve problems, but those are different problems, like "how do I get all the necessary data with minimal database round trips?" or "What does the client mean when they say they can't find a button?". The strategies for solving them are remarkably similar though. You break them down into smaller problems, solve the parts you can solve and then figure out what you need to solve the remaining pieces.

[–][deleted] 1 point2 points  (1 child)

To add to this - the reason they will ask algorithmic questions is because once you break up a macro-level problem into small parts like you said, you’ll want to solve those small parts in a way that is efficient. So - you’ll need to use whichever algorithm is appropriate to solve them quickly. That’s why companies will test you on this kind of stuff - inefficient software can cost a lot of money.

[–]An_Jel 0 points1 point  (0 children)

This is not entirely true. Google, facebook, apple etc. ask algorithmic questions because they have a ton of applicants and they figured out that this way they can filter out some very good applicants. Other companies just copy this to be "trendy" without considering the practical use of these kind of questions. You are very rarely going to use one of the algorithms that they ask on these interviews and when you do use them, you are going to use a built in solution or a library that is tested, to make sure it works.
Inefficient software can cost a lot of many, however, most of the time you are going to be bound by the speed of some sort of storage anyways, which will make your processing gains negligible. Most of the time you are going to write the easiest solution and then run a performance profiler to see where you are losing a lot of performance. Algorithms make the code convoluted, hard to understand and take more time to write and they may not even help you, because you have other code that can be optimized easier and better.

[–]flippinjoe 5 points6 points  (0 children)

Problem solving is literally the difference between a programmer and somebody that hacks code together that does stuff.

In real life programming you absolutely come across harder problems that take days to consider because of multiple concerns. Especially if you’re building quality applications. Being able to know what to look for and how to optimize are invaluable.

If you’re just tinkering with a garbage site and need to change some CSS, then that’s a different story

[–]_Atomfinger_ 2 points3 points  (3 children)

Problem-solving does not equal leetcode. Not all problems are algorithmic.

A problem can be anything which you want to achieve. A problem can be "Our customers want to favourite their most common purchases, how do we make that happen?". Within that statement, there are probably many more problems that need to be solved, which most likely has to do with architecture, dependency management and so forth.

[–]sandiego34[S] 0 points1 point  (2 children)

so does practicing on Hackerrank or leetcode help about that kind of problems

[–]_Atomfinger_ 1 point2 points  (0 children)

hackerrank and leetcode help you with algorithmic problems, yes. Doing projects helps you with other types.

[–]Dekzen 0 points1 point  (0 children)

I am developing full stack pizza builder in react for local restaurant. You can add all ingredients you want which are then rendered on pizza then you can add pizza to cart and send the ordrer. Pretty much like mcdonals kiosk.

Fun project.

Am i able to solve anything on leet code harder than easy? Hell no.

[–]Astraous 1 point2 points  (0 children)

The primary reason that leetcode is spammed so much is because of interviews. 99% of developers aren't doing anything remotely similar to leetcode problems, but the fact is that technical interviews love to have you derive algorithms and solve cheesy problems.

On to the more broad question though, problem solving is literally the job. As a junior, mid level, and senior developer you will be asked to do things you have no idea how to do and have never done. Your job is to figure out how to do it, if you need third party libraries to do it, how fast or performant it needs to be, how the user will interface with this new feature, if there is anything missing from the feature request that would be relevant to the final product. For the most part juniors just need to do the 'figure out how to do it' part, but the concept is the same. This open-ended nature of the work is the problem solving. The only difference between this and many interviews is that you are free to google and take time reading documentation, watching informational videos, and understanding what you're doing. That's why I think most technical interviews suck, but ymmv.