🚀 100 Days Java + DSA Challenge | Day 2 Today’s focus was on strengthening my programming fundamentals by covering: 🔹 Operators in Java (Arithmetic, Relational, Logical, Assignment) 🔹 Conditional Statements (if, if-else, nested if, switch) Understanding how operators work and how decisions are made in code is essential for building strong logic. These concepts are the backbone of problem-solving in Data Structures and Algorithms. 💡 Practiced writing multiple programs using conditions and improved my logical thinking step by step. Consistency is the key — small progress every day leads to big results. #100DaysOfCode #Java #DSA #LearningJourney #Coding #SoftwareDevelopment
Java DSA Challenge Day 2: Operators and Conditional Statements
More Relevant Posts
-
🚀 Day 41 / 180 – DSA with Java 🚀 📘 Topic Covered: Matrices & Marking Technique 🧩 Problem Solved: Set Matrix Zeroes Problem: Given a matrix, if an element is 0, set its entire row and column to 0. Approach: Used two auxiliary arrays to mark rows and columns that contain zeroes. In a second pass, updated the matrix by setting elements to zero based on the marked rows and columns. Key Learning: ✔️ Handling matrix-based transformations ✔️ Using extra space for clarity and simplicity ✔️ Breaking the problem into marking and updating phases If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Arrays #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀 **Day 10 of My DSA Journey in Java** Today’s focus was on one of the most powerful concepts in programming — **Loops** 🔁 Loops help us run a block of code multiple times, making programs more efficient, compact, and easier to debug. Here’s what I learned: 🔹 **For Loop** Understood its structure — initialization, condition, and update — and how it controls iterations. 🔹 **Nested Loops** Learned how to use loops inside loops, especially for solving pattern-based problems like star patterns ⭐ 🔹 **Jump Statements** `break` → Immediately exits the loop `continue` → Skips the current iteration and moves to the next 🔹 **While Loop** Executes as long as the condition remains true. 🔹 **Do-While Loop** Runs at least once, even if the condition is false — a unique and useful behavior. 💡 **Key Takeaway:** Loops are essential for writing efficient code and solving repetitive problems with ease. #Java #DSA #LearningInPublic #Programming #100DaysOfCode #JavaDeveloper
To view or add a comment, sign in
-
Understanding the difference between shallow copy and deep copy in Java really changed how I think about object handling and memory. A shallow copy duplicates the reference — meaning changes in one object can unexpectedly affect another. On the other hand, a deep copy creates an entirely independent object with its own memory allocation. This concept might seem small at first, but it becomes critical when working with complex data structures, real-world applications, and avoiding unintended side effects. Key takeaway: Always be clear whether you're copying data or just references. #Java #Programming #Learning #DSA #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀 Another step forward in my Java + DSA journey Focused on strengthening problem-solving through creating methods/functions: • Prime number check using √n optimization and early return • Palindrome logic by reversing digits • Factorial with correct loop conditions and edge cases • Clear understanding of return vs print in methods • Writing cleaner, reusable and readable functions 💡 Key takeaway: Breaking problems into methods makes logic clearer and code reusable. Consistent learning, stronger fundamentals 🧠🔥 #Java #DSA #ProblemSolving #Functions #LearningInPublic #Consistency #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 57 of My Java DSA Journey Today I worked on a classic Dynamic Programming problem: 💡 Subset Sum Problem 🧠 Approach: • Used recursion with memoization • At each step, decided whether to include or exclude an element • Stored intermediate results to optimize performance 🔍 Key Insight: A subset with sum k exists if: We can form k without current element OR We can form k - arr[i] including current element ⚡ What I learned: • DP pattern similar to Knapsack • Importance of proper memoization • Handling boolean DP states 🔥 Complexity: • Time: O(n × k) • Space: O(n × k) 🎯 Takeaway: Many DP problems are variations of a few core patterns. #Day57 #90DaysOfCoding #DSA #DynamicProgramming #Java
To view or add a comment, sign in
-
-
🚀 Day 46 / 180 – DSA with Java 🚀 📘 Topic Covered: Matrix Manipulation 🧩 Problem Solved: Rotate Image Problem: Given an n x n matrix representing an image, rotate it 90 degrees clockwise in-place. Approach: First transposed the matrix by swapping rows and columns across the diagonal. Then reversed each row to complete the 90-degree clockwise rotation efficiently without extra space. Key Learning: ✔️ Breaking matrix problems into smaller transformations ✔️ Understanding transpose operations ✔️ Solving in-place matrix rotation with O(1) extra space If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Matrix #ProblemSolving #Consistency 💙
To view or add a comment, sign in
-
-
🚀 Day 56 of My Java DSA Journey Today I solved a classic Dynamic Programming problem: 💡 0/1 Knapsack Problem 🧠 Approach: • Used recursion with memoization (Top-Down DP) • At each step, decided whether to pick or skip an item • Stored results in a DP table to avoid recomputation 🔍 Key Insight: Each item gives two choices: Pick it (if weight allows) or skip it — and take the maximum profit. ⚡ What I learned: • Importance of memoization in optimizing recursion • Understanding DP state transitions • Solving problems with overlapping subproblems 🎯 Takeaway: Dynamic Programming turns exponential problems into efficient solutions. #Day56 #90DaysOfCoding #DSA #DynamicProgramming #Knapsack #Java
To view or add a comment, sign in
-
-
🚀 Day 39 / 180 – DSA with Java 🚀 📘 Topic Covered: Math & Simulation 🧩 Problem Solved: Count Operations to Obtain Zero Problem: Given two integers, repeatedly subtract the smaller number from the larger one until one of them becomes zero. Return the number of operations performed. Approach: Simulated the process by comparing both numbers and subtracting the smaller from the larger in each step, counting the number of operations until one becomes zero. Key Learning: ✔️ Understanding simulation-based problem solving ✔️ Applying basic math logic efficiently ✔️ Breaking problems into simple iterative steps If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Day 65 of #100DaysOfLeetCode 💻✅ Solved “Majority Frequency Group” problem in Java. Approach: • Created a frequency array of size 26 for all characters • Counted occurrences of each character in the string • For each unique frequency, counted how many characters share that frequency • Selected the frequency with the highest group size • In case of tie, chose the higher frequency • Built the result string with characters having the selected frequency Performance: ✓ Runtime: 5 ms (Beats 57.84% submissions) ✓ Memory: 44.51 MB (Beats 72.88% submissions) Key Learning: ✓ Practiced frequency grouping techniques ✓ Learned how to handle tie-breaking conditions ✓ Strengthened logic building with nested loops and conditions Learning one problem every single day 🚀 #Java #LeetCode #DSA #Strings #Hashing #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 38 / 180 – DSA with Java 🚀 📘 Topic Covered: Strings & Two-Pointer Technique 🧩 Problem Solved: Is Subsequence Problem: Given two strings s and t, check whether s is a subsequence of t. Approach: Used two pointers to traverse both strings. Moved the pointer in s only when characters matched, and always moved the pointer in t, ensuring order is maintained. Key Learning: ✔️ Applying two-pointer technique on strings ✔️ Understanding subsequence vs substring ✔️ Writing clean and efficient O(n) solutions If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Strings #ProblemSolving #Consistency
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