🚀 Day 5 of #100DaysOfDSA (Java) Today was all about Loops & Control Flow 🔁 Covered: while loop do-while loop break and continue Practice problems using loop-based logic One thing I realized today 👇 Loops are simple in syntax but powerful in logic. They teach you how to think in patterns, repetitions, and edge cases. Understanding when to use: while (condition first) do-while (execute at least once) break (exit early) continue (skip iteration) …makes your code cleaner and more controlled. Small concepts. Big foundation. Consistency check: ✅ Day 5 done. 95 days to go. #DSA #Java #CodingJourney #100DaysOfCode #FutureFullStackDeveloper #LearningInPublic #DeveloperMindset
Java Loops & Control Flow: Day 5 of 100 Days of DSA
More Relevant Posts
-
Day 52/100 Completed ✅ 🚀 Solved LeetCode – Merge Intervals (Java) ⚡ Implemented an interval merging approach by first sorting intervals based on their start times and then traversing them to combine overlapping ranges. 🧠 Used comparison logic to detect overlaps and update interval boundaries, ensuring that all overlapping intervals are merged efficiently. This approach avoids redundant checks and processes the intervals in a single pass after sorting. 💯 Strengthened understanding of interval problems, sorting strategies, and greedy traversal techniques commonly used in real-world scheduling and timeline merging scenarios. Profile: https://lnkd.in/gaJmKdrA #LeetCode #100DaysOfCode #Java #DSA #CodingPractice #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 6 of #100DaysOfDSA (Java) Today I worked on Pattern Problems ⭐ Focused on: Nested loops Row & column logic Understanding how output structure maps to loop structure At first, patterns feel confusing. But once you understand how rows and columns interact, everything becomes structured. Big takeaway today 👇 Patterns improve logical thinking and control over loops — which is the foundation for solving complex problems later. Small practice. Strong foundation. Day 6 ✅ Consistency is building discipline. #DSA #Java #CodingJourney #100DaysOfCode #ProblemSolving #FutureDeveloper #LearningInPublic
To view or add a comment, sign in
-
-
🚀 Day 7 of #100DaysOfDSA (Java) Today’s focus: Functions & Methods Learned and practiced: Method declaration & return types Parameters & arguments Call by value in Java Breaking problems into reusable functions Big realization today 👇 Good programmers don’t write long code. They break problems into small, reusable methods. Understanding how to: Return values properly Pass inputs correctly Structure logic inside methods …makes code cleaner, readable, and professional. Day 7 ✅ Building logic. One step at a time. #DSA #Java #100DaysOfCode #CodingJourney #SoftwareDeveloper #LearningInPublic #DeveloperGrowth
To view or add a comment, sign in
-
-
Day 35 - Min Stack Designed a stack that supports push, pop, top, and retrieving the minimum element in constant time. Used an auxiliary stack to track the minimum value at each stage, ensuring efficient updates during push and pop operations. Time Complexity: O(1) for all operations #Day35 #LeetCode #Java #Stack #DSA #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 12/100 – LeetCode Challenge Problem: Middle of the Linked List Today’s problem focused on finding the middle node of a singly linked list. Approach: Used the Two-Pointer Technique (Slow & Fast pointers). slow moves one step at a time fast moves two steps at a time When fast reaches the end of the list, slow will be at the middle node Complexity: Time: O(n) Space: O(1) Concepts Practiced: Linked List traversal Two-pointer technique Efficient single-pass solution #100DaysOfCode #LeetCode #DSA #Java #LinkedList #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
#day314 of #1001daysofcode problem statement (0693): Binary Number with Alternating Bits Used XOR with right shift to transform alternating bits into a sequence of 1s, then applied the (x & (x + 1)) == 0 pattern(tocheck all bits are set bits or not). Sometimes bit tricks make problems beautifully simple. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
To view or add a comment, sign in
-
-
#day316 & #day317 of #1001daysofcode problem statement (0762): Prime Number of Set Bits in Binary Representation problem statement (0868): Binary Gap Tracked positions of consecutive 1s using bit manipulation and computed the maximum distance between them. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
To view or add a comment, sign in
-
-
🔥 GeekStreak60 | Day 6 Longest Span in Two Binary Arrays 📌 Problem: Find the longest span where two binary arrays have the same total value. 💡 Approach Keep track of the running difference between both arrays. When the same difference appears again, the elements in between form a valid span. #geekstreak60 #npci #DSA #Java #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 39 / 100 | Non-overlapping Intervals -Intuition: -The goal is to remove the minimum number of intervals so that the remaining intervals do not overlap. -The idea is to always keep the interval that ends earlier because it leaves more space for future intervals. -If an interval overlaps with the previous selected interval, remove it. -Approach: O(n log n) -Sort all intervals based on their ending time. -Initialize last to track the end of the last selected interval. -Traverse through the intervals starting from the second interval. -If the current interval's start is less than the last end, it means overlap exists, remove the interval.(count++) -Otherwise, update last end to the current interval’s end. -Return the count of removed intervals. -Complexity: Time Complexity: O(n log n) Space Complexity: O(1) #100DaysOfCode #Java #DSA #LeetCode #Greedy
To view or add a comment, sign in
-
-
#Java21 : 𝗦𝘁𝗿𝗶𝗻𝗴 𝗧𝗲𝗺𝗽𝗹𝗮𝘁𝗲𝘀 - 𝗖𝗹𝗲𝗮𝗿𝗲𝗿 & 𝗘𝗮𝘀𝗶𝗲𝗿 No more messy + or String.format()—just clean, safe, readable strings: Clean ✅ Readable ✅ Bug-free ✅ 𝘚𝘵𝘳𝘪𝘯𝘨 𝘯𝘢𝘮𝘦 = "𝘈𝘭𝘰𝘬"; 𝘚𝘵𝘳𝘪𝘯𝘨 𝘮𝘴𝘨 = "𝘏𝘦𝘭𝘭𝘰, {𝗻𝗮𝗺𝗲} ! 𝘞𝘦𝘭𝘤𝘰𝘮𝘦 𝘵𝘰 𝘑𝘢𝘷𝘢 "; 𝘚𝘺𝘴𝘵𝘦𝘮.𝘰𝘶𝘵.𝘱𝘳𝘪𝘯𝘵𝘭𝘯(𝘮𝘴𝘨); // 𝘏𝘦𝘭𝘭𝘰, 𝘈𝘭𝘰𝘬! 𝘞𝘦𝘭𝘤𝘰𝘮𝘦 𝘵𝘰 𝘑𝘢𝘷𝘢 Java is getting simpler, cleaner, and more powerful day by day! 💡 #Java #Java21 #StringTemplates #CleanCode #DeveloperLife
To view or add a comment, sign in
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