🚀 Day 89 of #100DaysOfCode Today’s coding challenge pushed me to think differently while working with Java’s Collection Framework -specifically, mastering how to handle duplicates in an ArrayList without using a HashSet. 💻 Problem Statement: Remove duplicates from an ArrayList<Integer> without using a HashSet. Hint: Use nested loops or a new list to store unique elements. 🧩 My Approach: I began by creating an ArrayList containing duplicate integer values. Instead of using a built-in Set (which automatically removes duplicates), I decided to manually filter the list using a simple logic: ✅ Create a new ArrayList to store unique elements. ✅ Traverse the original list using a loop. ✅ For each element, check if it already exists in the new list using contains(). ✅ If not present, add it. ✅ Finally, print the new list containing only unique elements. 🧠 What I Learned: ✨ How to remove duplicates manually without relying on built-in data structures. ✨ The importance of time complexity when using nested loops. ✨ Strengthened my understanding of ArrayList operations like add(), get(), and contains(). 💡 Each day of this challenge reminds me that coding is not just about syntax - it’s about problem-solving, logic, and persistence. From simple concepts to real-world logic, every step shapes me into a better developer. 🚀 Excited to keep building consistency and confidence, one line of code at a time! #Day89 #100DaysOfCode #JavaProgramming #ArrayList #CollectionsFramework #CodingChallenge #WomenInTech #SoftwareDevelopment #ProblemSolving #LearningInPublic #CodeEveryday #DeveloperJourney
Removing Duplicates from ArrayList in Java without HashSet
More Relevant Posts
-
🎯 Day 90 of #100DaysOfCode Today marks another milestone in my coding journey! I explored an interesting concept in Java’s Collection Framework, focusing on one of the most common yet essential data structures -the ArrayList. 💻 Problem Statement: Write a Java program to reverse the order of elements in an ArrayList<Integer> without using Collections.reverse(). 🧩 Approach I Followed: Instead of relying on Java’s built-in methods, I implemented a manual reversal logic to deepen my understanding of indexing and data manipulation. Here’s how I approached it: ✅ Step 1: Created an ArrayList and added a few integer elements. ✅ Step 2: Found the size of the list using numbers.size(). ✅ Step 3: Created a new ArrayList called reversedList to store reversed elements. ✅ Step 4: Used a for loop to traverse the list from the last index to the first, adding each element into the new list. ✅ Step 5: Printed both the original and reversed lists for comparison. 🧠 What I Learned Today: ✨ The importance of iteration and index manipulation in lists. ✨ How reversing without helper functions improves logic-building skills. ✨ Strengthened my understanding of ArrayList methods like add(), get(), and size(). ✨ Realized that coding isn’t about shortcuts -it’s about understanding how things work behind the scenes. 🚀 Every day of this challenge pushes me to go beyond syntax -to truly think like a programmer. With each problem solved, I feel more confident in building strong programming logic and clean, efficient code. 💪 The journey continues -consistency, curiosity, and code are my best companions in this 100-day challenge! #Day90 #100DaysOfCode #JavaProgramming #CollectionsFramework #ArrayList #ProblemSolving #CodingChallenge #WomenInTech #SoftwareEngineering #LearningInPublic #CodeEveryday #DeveloperJourney #ConsistencyIsKey
To view or add a comment, sign in
-
-
Day 19 of my Java Learning Series 🫀 Encapsulation: The Heartbeat of Java – My OOP Journey Begins Today felt like the first beat of a powerful engine. I stepped into the world of Object-Oriented Programming (OOP), and it instantly reminded me of how the heart fuels the human body—quietly, constantly, and critically. Java’s OOP model is built on four foundational pillars: 🔹 Encapsulation 🔹 Inheritance 🔹 Polymorphism 🔹 Abstraction But today, I met the first pillar—Encapsulation—and it felt like discovering the pulse of secure software design. 🔐 What I Learned Encapsulation is all about protecting the soul of an object—its data. It’s the art of hiding internal details and exposing only what’s necessary. Like a vault that holds valuables, Java lets us: Declare data members as private Provide controlled access through public getters and setters I also learned how the this keyword acts like a compass—it helps Java distinguish between local and instance variables, avoiding confusion and ensuring clarity. 🛠️ Constructors: The Silent Architects Then came the twist—Java’s constructor, often mistaken for a method, but it’s more like a silent architect. It doesn’t return anything, yet it builds everything. It shares its name with the class and is automatically called when an object is born. This realization helped me understand the difference between a method and a constructor—not just in syntax, but in purpose. 📚 Why This Matters Encapsulation isn’t just a coding technique—it’s a mindset. It teaches us to build systems that are secure, modular, and maintainable. And today, I took my first step toward that mindset. Learning with TAP Academy has made these concepts not just understandable—but exciting. Can’t wait to explore the next pillar tomorrow! Let’s connect if you’re also on a Java journey or love diving deep into core concepts. 🚀 #Java #OOP #Encapsulation #Constructor #ObjectOrientedProgramming #CodingJourney #TapAcademy #WomenWhoCode #100DaysOfCode #JavaDeveloper #TechLearning #CodeNewbie #SoftwareEngineering #LearnInPublic
To view or add a comment, sign in
-
-
💡Abstract Classes in Java In today’s coding practice, I explored how a single parent reference can represent multiple child objects — one of the most powerful ideas in Object-Oriented Programming! Using a simple House construction example, I learned how Java’s object reference enables flexibility and reusability in code. Each house type (Glass, Wood, Concrete) shares the same structure but defines its own design — showing how polymorphism brings real-world behavior into code. 🧱 Key Learning Points 🔹 A parent reference (House) can point to different child objects (Glass, Wood, Concrete). 🔹 The common methods (BuildBasement() and Window()) stay the same for all houses. 🔹 The abstract method (WallsAndPillar()) changes its behavior depending on the house type. This concept beautifully shows how abstraction and polymorphism help us design scalable, flexible, and maintainable software systems. Thank You to Anand Kumar Buddarapu Sir for helping me understand this concept clearly! #Java #OOPs #Polymorphism #Abstraction #LearningJourney #CodingInJava #JavaProgramming
To view or add a comment, sign in
-
📚 Day 42 of My Java Journey: Deep Dive into ArrayList & Collections Framework Just completed an intensive session on Java Collections Framework, and the depth of knowledge shared was incredible! Here are the key takeaways from today's learning: 🔑 Core Concepts Mastered: • ArrayList Fundamentals - Learned how ArrayList is a dynamic, resizable array with initial capacity of 10, expanding by formula: (currentCapacity * 3/2) + 1 when needed • ArrayList vs Array - Key differences: ArrayList stores only objects (not primitives), supports heterogeneous data, preserves insertion order, and allows duplicates and null values • Memory Management - Understanding how resizing creates a new ArrayList and copies elements (O(n) operation) - crucial for performance optimization • Access Methods: Traditional for loop with .get(index) Enhanced for-each loop for simple iteration Iterator pattern for cursor-based traversal ListIterator for bidirectional navigation • Hierarchy Understanding - ArrayList → List → SequencedCollection → Collection → Iterable (knowing this chain is essential for interviews!) 💡 Key Insight: The most impactful learning was understanding why ArrayList resizing is costly (O(n) complexity) and how specifying initial capacity can significantly improve performance. Small optimizations, big impact! 🎯 Practical Takeaway: Collections Framework isn't just about memorizing methods - it's about understanding when to use what. ArrayList excels at rear-end insertions without resizing but struggles with frequent insertions at arbitrary positions. Special thanks to the instructor for breaking down complex concepts with real-world analogies (loved the Mandi Biryani framework explanation! 😄) Tomorrow: LinkedList deep dive! 🚀 What's your go-to collection in Java? Drop your thoughts below! 👇 #Java #JavaProgramming #CollectionsFramework #ArrayList #DataStructures #CodingLife #JavaDeveloper #Programming #TechEducation #SoftwareEngineering #BackendDevelopment #100DaysOfCode #LearnToCode #DeveloperCommunity #JavaCollections #CodingBootcamp #TechSkills #SoftwareDevelopment #ProgrammingConcepts #JavaInterview #DSA #TechLearning TAP Academy
To view or add a comment, sign in
-
-
𝗧𝗵𝗲 𝗺𝗼𝘀𝘁 𝘂𝗻𝗱𝗲𝗿𝗿𝗮𝘁𝗲𝗱 𝘀𝗸𝗶𝗹𝗹 𝗲𝘃𝗲𝗿𝘆 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿 𝘀𝗵𝗼𝘂𝗹𝗱 𝗺𝗮𝘀𝘁𝗲𝗿 When I started coding, I thought becoming a great developer meant learning as many languages as possible. Java, Python, JS, C++, Go — the list kept growing. But over time I realized something important: 𝗜𝘁’𝘀 𝗻𝗼𝘁 𝘁𝗵𝗲 𝗻𝘂𝗺𝗯𝗲𝗿 𝗼𝗳 𝗹𝗮𝗻𝗴𝘂𝗮𝗴𝗲𝘀 𝘆𝗼𝘂 𝗸𝗻𝗼𝘄. 𝗜𝘁’𝘀 𝗵𝗼𝘄 𝘄𝗲𝗹𝗹 𝘆𝗼𝘂 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀. The best developers I’ve met aren’t the ones who know 10 stacks… They’re the ones who: 🔹 Break complex problems into small parts 🔹 Ask the right questions before coding 🔹 Understand why something is failing, not just where 🔹 Write code that another person can read Once you learn problem-solving, learning a new language becomes just another weekend project. Tech changes fast. But the habit of thinking clearly? 𝗧𝗵𝗮𝘁’𝘀 𝘆𝗼𝘂𝗿 𝗿𝗲𝗮𝗹 𝘀𝘂𝗽𝗲𝗿𝗽𝗼𝘄𝗲𝗿. What’s one skill you think every developer should master — beyond code? 🤔 #softwareengineering #developerlife #problemsolving #programming #learning #techskills
To view or add a comment, sign in
-
-
👨💻 Day 66 of My Java Full Stack Journey at 10000 Coders Topic of the Day: Problem Solving with ArrayList Today, I practiced multiple real-time coding problems using ArrayList in Java. These exercises helped me strengthen my understanding of Collections, looping logic, and problem-solving patterns. 🔹 Problems Solved Today & Approaches ✅ 1️⃣ Remove all even numbers from an ArrayList 📝 Approach: Iterate list or use removeIf() to filter out numbers where n % 2 == 0. ✅ 2️⃣ Find the maximum element in an ArrayList 📝 Approach: Initialize a variable max, loop through list, update when a larger value is found. ✅ 3️⃣ Merge two ArrayLists into one 📝 Approach: Use addAll() to combine two lists into a single list. ✅ 4️⃣ Reverse an ArrayList 📝 Approach: Swap elements from start & end using loop (alternate: Collections.reverse()) 🧠 Key Learning Highlights Practiced conditional logic + loops with collection data Improved thinking in terms of time complexity & clean logic Understood when to use built-in methods vs manual logic Most real-time applications rely heavily on Collections — great practice today ✅ Grateful to 10000 Coders and my mentor Gurugubelli Vijaya Kumar for encouraging hands-on DSA learning and problem-solving consistency every day. #Day66 #10000Coders #JavaFullStack #ArrayList #JavaCollections #ProblemSolving #DSA #CodingPractice #LogicBuilding #JavaDeveloper #LearningJourney #CodeNewbie #ConsistentLearning
To view or add a comment, sign in
-
-
💭 Object-Oriented Programming Beyond the Code Today I had one of those lightbulb moments that completely change how you see programming 👨🏻💻 While learning and building a small OOP Java project, I kept wondering why so many classes didn’t seem to be directly connected. 🧩 Then it finally clicked: Not everything in your codebase needs to talk to everything else. Each class should have its own responsibility and the real power of OOP lies in delegation. 🔹One class coordinates the process. 🔹Another handles the logic. 🔹Another stores the data. 🔷And together, they form a clean, independent system that works. This realization felt important for my career, to become someone who not just “writes code”, but someone who actually designs software. Understanding this made me realize: programming isn’t just about making things work, it’s about making them make sense. Definitely had that “Huh! now I get it” moment while learning OOP 🤓 Can you recall any struggle you may have had while learning POO? #programming #java #learning #softwaredevelopment #oop #devjourney #softwareengineering #learningbydoing
To view or add a comment, sign in
-
-
#120DaysOfCodingChallenge — on the topic Constructor Chaining in Java 👇 🚀 #Day20 of my #120DaysOfCodingChallenge in #JavaFullStack at #DestinationCodegnan! Today, I learned on the topic Constructor Chaining in Java 👇 — a key concept in Object-Oriented Programming that enhances code reusability and efficiency ⚙️💡 📌 What I Learned: 👉 Constructor Chaining is the process of calling one constructor from another within the same class or from a parent class using the keywords this() and super(). 👉 It helps avoid code duplication by allowing constructors to reuse initialization logic. 👉 It improves readability and maintainability, ensuring smoother object creation flow. 💡 Real Use Case: Constructor Chaining is often used when creating multiple constructors with different parameters — allowing one constructor to delegate common setup tasks to another. This concept deepened my understanding of inheritance, constructor overloading, and how Java efficiently manages object initialization. Grateful to my mentor Anand Kumar Buddarapu, and appreciation to Uppugundla Sairam (Founder) and Saketh Kallepu (Co-Founder) for their constant support and motivation at #DestinationCodegnan 🙌 #Java #FullStackDevelopment #Codegnan #LearningJourney #Day20 #JavaProgramming #ConstructorChaining #CodingChallenge #ObjectOrientedProgramming #120DaysOfCode
To view or add a comment, sign in
-
-
🧠 Day 13: Understanding Loops and Operators in Java Today, I took a deep dive into loops and operators — the real backbone of logical thinking in programming. When I first saw loops, they felt tricky. But once I started solving problems, I realized they’re just smart ways to repeat tasks — and operators help us make decisions inside them. 💻 Here’s what I practiced today: Sum or Product of numbers Terms of an Arithmetic Progression (AP) Reverse of a number Binary ↔ Decimal conversions Square root calculation Checking number sequence Pattern problems: ➤ Mirror number pattern ➤ Inverted number pattern ➤ Star pattern ➤ Triangle of numbers ➤ Diamond of stars ✨ Each problem taught me how to control logic flow, use nested loops effectively, and think step by step like a programmer. 🚀 Every loop I wrote made me more confident about how code really works behind the scenes. 💬 What was the first programming concept that made things finally “click” for you? #Java #Loops #Operators #CodingJourney #ProblemSolving #100DaysOfCode #LearningDSA #CodeNewbie #TechLearning #NeverStopLearning #WomenInTech #BuildInPublic #DeveloperJourney #CodingCommunity #LearnJava #ProgrammingBasics #KeepCoding #CodeNewbie #TechJourney
To view or add a comment, sign in
-
🎯 Java Bootcamp – Day 3 Highlights 💡 Object-Oriented Programming (OOP) Unlocked! Today’s session was a deep dive into the world of OOP — the secret sauce behind clean, scalable, and real-world Java applications. Here's what I tackled: 🧱 OOP Foundations 🔹 Class = Blueprint | Object = Real-world instance 🔹 Why OOP? Because modular, reusable code is the future! 🛠️ Constructors & Methods 🔹 Used constructors to auto-initialize object data 🔹 Built methods that do things and return results (like calculating interest!) 🧯 Error Handling 101 🔹 Explored try-catch to gracefully handle runtime errors 🔹 No more crashes — just clean, safe execution! 💰 Hands-On Project: BankAccount App 🔹 Built a class with deposit(), withdraw(), and displayBalance() 🔹 Added error checks for smoother user experience 🔹 Practiced real-world logic with clean OOP structure Each concept added a new layer to my Java mindset. Can’t wait to keep building smarter and cleaner code as the bootcamp continues! 💻🔥 #JavaBootcamp #Day3 #OOPinJava #LetsUpgrade #TechJourney #StudentDeveloper #ParulUniversity #100DaysOfCode #CodeWithPraneel #BuildInPublic
To view or add a comment, sign in
-
Explore related topics
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