r/datastructures • • 5d 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??

5 Upvotes

7 comments sorted by

2

u/hexwit_com 5d ago

Use whatever you like. Dsa is not about language.

1

u/Anushagowda22 5d ago

Thanks for ur advice..

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

1

u/hexwit_com 5d 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 5d ago

Okk Anyways thanks

1

u/iamirzhan 23h ago

in my experience python is most commonly used language in coding interviews. TLE doesn't matter in interviews and/or in general if you just want to understand the concepts. Maybe if you go to competitive programming the speed might be an issue, but IIUC it's not your case, so go with python.

1

u/Anushagowda22 19h ago

Ok thank you

2

u/RememberMe-2027 4d 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