It's important to keep practicing algorithms and data structures to stay sharp. If you’re in a job search, mastering these fundamentals is key, you will probable have technical interviews with coding exercises. LeetCode remains the most important platform for this. I’ve decided to start a new repository to collect my solutions and track my progress. I will be updating it also with questions and answers for Java and Spring Boot. The goal is to build a solid knowledge base with exercises. Repo: https://lnkd.in/dmN6z2_p Feel free to give it a "Star" on GitHub to support the repo and save it for future reference #Java #DSA #CodingInterview #LeetCode #BuildingInPublic #DevCommunity
Mastering Algorithms and Data Structures with LeetCode
More Relevant Posts
-
Just shipped my first open-source Java library : llm4j-schema If you're integrating LLMs (ChatGPT, Claude) into Java or Spring Boot apps, you know the pain: the model returns raw text, you parse it manually, hope the JSON is valid, add retry logic... llm4j-schema solves this. Define a Java Record, get a typed object back: @LLMSchema public record ProductReview( String productName, int rating, String summary ) {} ProductReview review = extractor.extract(ProductReview.class, userText); - Type-safe Java objects from any LLM - Spring Boot starter, 2 min setup - Auto-retry on parse failure - OpenAI + Anthropic support - Available on Maven Central The Java ecosystem is way behind Python when it comes to AI tooling. This is my contribution to close that gap. GitHub: https://lnkd.in/e37jtdut If you find it useful, a Star on the repo goes a long way, it helps other Java developers discover the project! Would love to hear from Java devs, what's your biggest pain point when integrating LLMs in your stack? #Java #OpenSource #AI #SpringBoot #LLM #Developer
To view or add a comment, sign in
-
🚀 Day 11: Scope & Memory – Mastering Variable Types in Java 🧠📍 Today’s focus was on understanding where data lives in a program—a crucial step toward writing efficient and predictable code. In Java, the way a variable is declared directly impacts its scope, lifetime, and memory allocation. Here’s how I broke it down: 🔹 1. Local Variables – Temporary Workers ⏱️ • Declared inside methods • Accessible only within that method • Created when the method starts, destroyed when it ends • ⚠️ Must be initialized before use (no default values) 🔹 2. Instance Variables – Object Properties 🏠 • Declared inside a class, outside methods • Require an object to access • Each object gets its own copy • Changes in one object do NOT affect another 🔹 3. Static Variables – Shared Data 🌐 • Declared with the static keyword • Belong to the class, not objects • Accessed using the class name (no object needed) • Only one copy exists, shared across all instances 💡 Key Takeaway: Variable scope is more than just visibility—it’s about memory management and data control. Knowing where and how variables exist helps in building optimized and scalable applications. Step by step, I’m strengthening my foundation in Java and moving closer to writing production-level code. 💻 #JavaFullStack #CoreJava #CodingJourney #VariableScope #MemoryManagement #Day11 #LearningInPublic
To view or add a comment, sign in
-
🔥 Java Records — Cleaner code, but with important trade-offs I used to write a lot of boilerplate in Java just to represent simple data: Fields… getters… equals()… hashCode()… toString() 😅 Then I started using Records—and things became much cleaner. 👉 Records are designed for one purpose: Representing immutable data in a concise way. What makes them powerful: 🔹 Built-in immutability (fields are final) 🔹 No boilerplate for getters or utility methods 🔹 Compact and highly readable 🔹 Perfect for DTOs and API responses But here’s what many people overlook 👇 ⚠️ Important limitations of Records: 🔸 Cannot extend other classes (they already extend java.lang.Record) 🔸 All fields must be defined in the canonical constructor header 🔸 Not suitable for entities with complex behavior or inheritance 🔸 Limited flexibility compared to traditional classes So while Records reduce a lot of noise, they are not a universal replacement. 👉 They work best when your class is truly just data, not behavior. 💡 My takeaway: Good developers don’t just adopt new features—they understand where not to use them. ❓ Question for you: Where do you prefer using Records—only for DTOs, or have you explored broader use cases? #Java #AdvancedJava #JavaRecords #CleanCode #BackendDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
Day 20 Java I/O Deep Dive Today I went deeper into Java Input/Output and really understood how input is handled internally. Starting from the basics of Input Streams, I explored how data flows from the keyboard to the program using System.in and how Java processes that data step by step. Then I compared different ways of taking input in Java: 👉 System.in – the fundamental input stream, low-level and not very user-friendly 👉 Scanner – very easy to use, supports parsing of different data types, but comparatively slower 👉 BufferedReader – faster and more efficient, especially when dealing with large input data, but requires handling exceptions and manual parsing I also learned when to use what: ✔ For quick programs and beginners → Scanner is best ✔ For competitive programming or large data → BufferedReader is preferred This deep dive helped me understand not just how to write code, but why certain methods are faster and more efficient than others. Slowly building a strong foundation in Java Guided by Aditya Tandon sir #Java #IOStreams #CodingJourney #DeveloperLife
To view or add a comment, sign in
-
-
Solved LeetCode 17 – Letter Combinations of a Phone Number using backtracking in Java. Approach: Mapped each digit (2–9) to its corresponding characters using a simple array for O(1) access. Then used backtracking to build combinations digit by digit. For every digit: Pick each possible character Append → explore next digit → backtrack Key idea: Treat it like a tree of choices, where each level represents a digit and branches represent possible letters. Key learnings: Backtracking = build → explore → undo StringBuilder helps avoid unnecessary string creation Problems like this are about systematic exploration of choices Time Complexity: O(4^n * n) Space Complexity: O(n) recursion stack + output Consistent DSA practice is strengthening pattern recognition day by day. #Java #DSA #Backtracking #LeetCode #CodingInterview #SoftwareEngineering
To view or add a comment, sign in
-
-
Starting a 100-day Java series, and this is day 1 ☕ Today, we are covering Java variables - from syntax to scope to memory, all in one place. Declaration, data types, the 3 types of variables, casting, the final keyword and the mistakes most beginners make without realising. 10 slides covering everything. The last slide has a full cheat sheet worth saving.🔖 For more such tech content, follow @herbrewcode on Instagram too. #Java #Day1 #100DaysOfCode #LearnToCode #CodingJourney #HerBrewCode
To view or add a comment, sign in
-
🚀 Starting My Java Journey I’ve recently started learning Java and diving into Data Structures & Algorithms. So far, I’ve learned: • Basics of Java (variables, loops, conditions) • Arrays and how to work with them • Solving beginner problems on LeetCode I’m really enjoying the process of solving problems and improving my thinking skills. Looking forward to building projects and sharing my progress here! If you have any tips or resources, feel free to share 💻 #Java #DSA #CodingJourney #LearningInPublic
To view or add a comment, sign in
-
Day 97 - LeetCode Journey Solved LeetCode 496: Next Greater Element I in Java ✅ This is a perfect example of combining Monotonic Stack + HashMap for efficiency. Instead of checking each element one by one, I precomputed the next greater elements using a stack and stored them in a map for quick lookup. Smart preprocessing saves time 💡 Key idea: Traverse nums2, use a stack to find next greater elements, and map them for instant access. Key takeaways: • Monotonic Stack pattern • Using HashMap for fast queries • Avoiding nested loops (O(n²) → O(n)) • Preprocessing for optimization ✅ All test cases passed ⚡ O(n) time and O(n) space Stack + Map combo is a game changer for these types of problems 🔥 #LeetCode #DSA #Java #Stack #MonotonicStack #HashMap #ProblemSolving #CodingJourney #InterviewPrep #Consistency #100DaysOfCode
To view or add a comment, sign in
-
-
I just wanted to share something that really changed my life recently while I was coding in Java. As someone who has been working with this language for a long time, I always hated how we had to handle long Strings, like SQL queries or JSONs. It was a mess of \n and + everywhere, right? But then I started using Java Text Blocks (which came out in Java 15), and wow... it’s so much better! Here is why I think they are awesome: No more + signs: You just use three double quotes """ and write your text normally. It looks exactly like the final result. Easy to read: Since you don't have all those concatenation symbols, your code stays clean. My eyes are very happy now! Smart spaces: Java is smart enough to manage the indentation, so your code stays aligned but the String doesn't get a bunch of unnecessary spaces at the beginning. Check out this quick example of how I'm writing my SQL now: If you are still using the old way, please do yourself a favor and try Text Blocks. It makes the developer's life much easier and the code way more clean. #Java #Backend #CodingTips #CleanCode #SoftwareEngineering
To view or add a comment, sign in
-
-
🧱 SOLID Principles in Java – Write Code That Doesn't Come Back to Haunt You You know that feeling when touching one feature breaks three unrelated things? That's what life looks like without SOLID principles. I just published a deep-dive post covering all five principles with real Java examples: ✅ Single Responsibility – One class, one job. Stop your Invoice class from moonlighting as a printer AND a database. ✅ Open/Closed – Extend behavior without cracking open existing code. No more endless if-else chains. ✅ Liskov Substitution – Your Penguin shouldn't throw UnsupportedOperationException when asked to fly. ✅ Interface Segregation – Stop forcing Robots to implement an eat() method. ✅ Dependency Inversion – Depend on abstractions, not implementations. Your service shouldn't care if it's MySQL or PostgreSQL. 🔗 Read the full post: https://lnkd.in/gfA5g8VG #Java #SOLID #CleanCode #SoftwareEngineering #OOP #DesignPrinciples #BackendDevelopment #SpringBoot #Programming #TechBlog #100DaysOfCode
To view or add a comment, sign in
Explore related topics
- Why Use Coding Platforms Like LeetCode for Job Prep
- Java Coding Interview Best Practices
- Tips for Coding Interview Preparation
- How to Start Learning Coding Skills
- Leetcode Problem Solving Strategies
- Prioritizing Problem-Solving Skills in Coding Interviews
- Improving Self-Taught Coding Skills for Job Seekers
- How to Start Strong in Coding Jobs
- Building Comprehensive Programming Skills
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development