r/javahelp • • Nov 02 '20

Should I master Data Structure & Algorithm before jumping programming?

Should I master Data Structure & Algorithm before jumping into programming with Java or any other languages?

19 Upvotes

16 comments sorted by

•

u/AutoModerator Nov 02 '20

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions

  • You include any and all error messages in full

  • You ask clear questions

  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/[deleted] Nov 02 '20

I heavily recommend you to go through the fundamentals of programming before you go do data structure and algorithm. The reason being is that data structure and algorithm have pseudocode which you have to interpret and apply it in programming. If you don't understand programming and go onto Data Structure & Algorithm first, you would struggle in pseudocode quite greatly and won't be able to think in-depth. Typically the language you should try to understand in a somewhat proficient level is probably java or some language in C/Python.

2

u/kabou_A Jan 04 '21

Thank you a lot

12

u/-themailerdoraemon- Nov 02 '20

Doesn’t matter. If you can’t do the basics, how are you going to master DS?

19

u/the-room-is-on-fire Nov 02 '20

I guess you could learn DS & A through Pseudocode but I don't think it's very useful. I think you should learn the basics of some language so that you have the means to implement DS & A, which is super important imo.

9

u/Xandy13 Nov 02 '20

No! Also, "master" is a strong word. Just get on it and, when you need something, you're going to learn how to do it (Khan Academy *ahem*) -- that's if you really want it. So, go and program to your heart's content!

4

u/[deleted] Nov 02 '20

generally in college, they teach u the basics of programming, and how everything works behind the scenes, and memory stuff (like pointers in C, etc...) and only then they teach you Data structures and algorithms, i dont see why u couldnt learn them before learning programming, BUT it would be much easier imo to learn a language confidently first, and learn how everything works in memory, that takes u to the next lvl.

4

u/PatataMaxtex Nov 02 '20

I think the best way is to learn both with each other. Learning algorithms is easier if you can program them as a practice, same with DS and these are good ways to improve your programming skills.

4

u/[deleted] Nov 02 '20

Pretty sure you should learn programming first

1

u/Orffyreus Nov 02 '20

Yes, maybe by implementing some simple algorithm ;-)

2

u/hageldave Nov 02 '20

no. learn one while learning the other

2

u/hageldave Nov 02 '20

Sorry I feel like I should elaborate more. If you dont know any basic programming, then DSA may feel a little abstract and further away. After all, DSA are there to be used in practice, not in theory.

1

u/jacrispy704 Nov 02 '20

My college has you take two semesters of Java programming language.. first semester is basics, second is intermediate/more intricate stuff. Then you go on to do DS&A. Take this info and do what you will. :)

1

u/Robbzter Nov 02 '20

Programming first, no matter what language. It'll help you understand pseudocode, and you won't have such a hard time implementing your own algorithms and ds. By the time I started to get into 'real' algorithms, I already had quite some experience with Python.