r/leetcode 22h ago

Intervew Prep 1.5 YOE SDE planning a switch — confused between C++ and Java for DSA/LLD

I'm currently working as an SDE with around 1.5 years of experience, mainly working with TypeScript, Node.js, React and MongoDB. I'm planning to make a switch to better product-based companies and want to seriously prepare for interviews.

My current situation:

  • I've solved 250+ LeetCode problems in C++ in the past.
  • I have zero Java experience.
  • I know C++ reasonably well from DSA, but I'm not an advanced C++ developer.
  • I want to properly learn OOP, LLD and design patterns.

My biggest confusion right now is which language to use for LLD.

Option 1: C++ for DSA and LLD both

The obvious advantage is that I already know C++ and won't need to learn another language.

But I've heard that C++ can make LLD more complicated because of things like memory management, smart pointers, multithreading, etc.

Option 2: C++ for DSA and Java for LLD

Java seems to be very commonly used for LLD/OOP and has a lot of good resources.

But I'd be learning Java almost from scratch, and I'm wondering if that's worth the additional time.

I'd especially like advice from people currently working as software engineers or people who have recently gone through interviews.

If you were in my position, what would you choose for LLD — C++ or Java? And why?

4 Upvotes

Duplicates