r/datastructures • • 3d ago

Java or python for dsa??

Hello..

I am a bca graduate with not much programming knowledge neither skills...

I am thinking to start dsa , but confused to choose language..

Many suggestions told java would be better...but I am thinking to go with python as I am also joining an ai/ml online course...

So it would be helpful for both..

Any suggestions...whether should I go with java or python??

4 Upvotes

5 comments sorted by

1

u/hexwit_com 3d ago

Use whatever you like. Dsa is not about language.

1

u/Anushagowda22 3d ago

Thanks for ur advice..

But the thing is I heard that python have tle issues...what about that??

1

u/hexwit_com 3d ago

Well yes, but you said you going to work with python afterwards. I personally don’t honour dynamic typing. But ml world love that. So choose depends on the needs behind the dsa.

1

u/Anushagowda22 3d ago

Okk Anyways thanks

2

u/RememberMe-2027 2d ago

Java would make it easier for you to read and explicitly understand what you are writing in detail. Python has shorthand syntax for many things.

In an interview, you would need to be quick with implementation, so Python can help. But don't really worry about it much. Most online test portals are well built to accept both solutions as long as the logic is correct.

Where are you learning it from? Curious on why such confusion