💻 From identifying a gap to getting merged! I noticed the JugglerSequence algorithm in TheAlgorithms/Java repository had zero test coverage. So I took action: 1️⃣ Created JugglerSequenceTest.java with 4 comprehensive test cases 2️⃣ Covered edge cases (n=1) and typical inputs (n=2, 3, 9) 3️⃣ Ensured all tests verify correct sequence generation 4️⃣ Got reviewed and merged! ✅ The result? Better code quality for 59k+ stars worth of developers using this repository. Every bug caught in testing is one less bug in production. That's the power of good test coverage! 🎯 What's your first open source contribution story? Drop it in the comments! 👇 Dr. Sripath Roy Koganti #SoftwareTesting #OpenSource #Java #kl #CodingJourney #GitHub #Programming #TestDrivenDevelopment #DeveloperCommunity
Added test coverage to JugglerSequence algorithm, got it merged
More Relevant Posts
-
#100DaysOfCode – Day 79 Middle of the Linked List Problem: Given the head of a singly linked list, return the middle node of the list. If there are two middle nodes, return the second one. Example: Input: [1,2,3,4,5] → Output: [3,4,5] Input: [1,2,3,4,5,6] → Output: [4,5,6] My Approach Technique Used: Tortoise and Hare Method (Two-Pointer Technique) Initialize two pointers slow (tortoise) and fast (hare) at the head. Move slow one step at a time and fast two steps at a time. When fast reaches the end, slow will be at the middle of the list. Time Complexity: O(N) Space Complexity: O(1) The Tortoise and Hare Method is a classic example of how a simple, well-thought-out algorithm can achieve elegant and efficient results. #100DaysOfCode #LeetCode #Java #ProblemSolving #DataStructures #LinkedList #TakeUForward #GeeksForGeeks #CodingJourney #CleanCode #TortoiseAndHare #TwoPointerTechnique
To view or add a comment, sign in
-
-
⚙️ BeanFactory vs ApplicationContext Both BeanFactory and ApplicationContext are Spring containers, but they differ in functionality: 🔹 BeanFactory – The basic container that lazily initializes beans, mainly used for lightweight applications. 🔹 ApplicationContext – A more advanced container that eagerly loads beans and provides additional features like event handling, internationalization, and annotation-based configuration. #SpringFramework #Java #SpringBoot #BeanFactory #ApplicationContext #BackendDevelopment #SoftwareEngineering #Programming #TechLearning #CodeBetter
To view or add a comment, sign in
-
Enforced Type Safety with Server-Defined Types 🔄⚙️ Join Steve Kinney to master end-to-end type safety with TypeScript. Share types between client and server, use Zod schemas to avoid API surprises, build with tRPC, and simplify database migrations with Prisma. https://lnkd.in/gHzB-BiA #Fullstack #Backend #WebDev #Programming #Coding #LearnToCode #TypeScript
To view or add a comment, sign in
-
🚀 Day 22 & 23 of #100DaysofCode Bit Manipulation in Java This week, I focused on mastering bitwise operations, which are crucial for competitive programming and low-level optimizations. Here’s what I explored: ✅ Get, Set, Clear, Update ith Bit – Access and modify specific bits in a number. ✅ Clear Range of Bits – Clear bits from 0 to i or i to j efficiently. ✅ Check Power of Two – Using (n & (n-1)) == 0 for fast checks. ✅ Count Set Bits – Count the number of 1s in a number efficiently using Brian Kernighan’s algorithm. 💡 Bit manipulation is not just about numbers; it’s about thinking in binary and optimizing memory and performance.
To view or add a comment, sign in
-
𝐃𝐚𝐲 𝟐𝟏 𝐨𝐟 #50DaysOfDSA 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐋𝐢𝐧𝐤 : https://lnkd.in/gzNm43Xx 𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧 𝐋𝐢𝐧𝐤 : https://lnkd.in/gAXsPq4Q Today’s challenge was all about counting substrings efficiently — without generating them one by one. The problem? Given a binary string, find the number of substrings that contain only ‘1’s, modulo 1e9+7. 𝐊𝐞𝐲 𝐈𝐧𝐬𝐢𝐠𝐡𝐭: Instead of checking all substrings, simply count consecutive 1s. For every continuous segment of k ones, the number of valid substrings is: 𝐤 * (𝐤 + 𝟏) / 𝟐 But we optimize further by counting while we iterate. 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡: -> Maintain a running count of consecutive 1s -> Add that to the total whenever a 1 appears -> Reset when a 0 appears -> Handle large numbers using modulo 𝐓𝐢𝐦𝐞 𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲: 𝐎(𝐧) 𝐒𝐩𝐚𝐜𝐞 𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲: 𝐎(𝟏) #leetcode #dsa #java #coding #problemsolving #programming #learningeveryday #devcommunity #softwareengineering #100daysofcode #girlswhocode #problem solving
To view or add a comment, sign in
-
-
✨ Day 55 of 100: Remove Nth Node From End of List ✨ Today’s challenge was LeetCode 19 – Remove Nth Node From End of List 💫 🧩 The task: Given the head of a linked list, remove the n-th node from the end and return the head of the modified list. 💡 Key Takeaways: 🔹 Strengthened understanding of the two-pointer technique (fast & slow pointers). 🔹 Learned how to efficiently find the target node in one pass, avoiding the need to calculate the length first. 🔹 Practiced handling edge cases, such as removing the head node. 🚀 Concept reinforced: Efficient linked list traversal using two-pointer approach — a powerful pattern for many linked list problems. #100DaysOfCode #Day55 #LeetCode #Java #LinkedList #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
Day 11/100 — Coding Challenge Today’s problem was about identifying leaders in an array, which is a great exercise in understanding traversal from the right and maintaining a dynamic maximum. Problem: Find all elements in an array that are greater than or equal to every element to their right. Approach: Traverse the array from right to left. Keep track of the maximum element encountered so far. If the current element is greater than or equal to this max, it’s a “leader.” Reverse the collected list to maintain left-to-right order. This solution had a time complexity of O(n) and passed all 1111/1111 test cases with 100% accuracy. This challenge reinforced how scanning in reverse can simplify certain problems and eliminate extra computations. #100DaysOfCode #Java #DSA #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 414 of #500DaysOfCode 🔢 LeetCode 2536: Increment Submatrices by One (Medium) Today I worked on an interesting matrix manipulation problem that teaches an important optimization idea — 2D Difference Arrays. 🧠 Problem Summary We are given an n x n matrix initialized with zeros and a list of queries. Each query represents a submatrix, and we need to increment every element inside that submatrix by 1. A brute-force solution would update each cell for every query, which becomes inefficient when the matrix and number of queries grow. ⚡ Key Insight Instead of updating all cells directly, we use a 2D prefix / difference matrix technique: Update only the corners of each submatrix Convert the difference matrix into the final matrix using prefix sums Achieve O(n² + q) performance instead of O(q · n²) A neat trick that’s extremely useful for range update problems! ✅ Takeaways Difference arrays are not just for 1D — they scale beautifully to 2D Matrix prefix sums simplify many complex update operations Thinking in terms of range operations often leads to faster algorithms 💻 Tech Used Java 2D prefix sum optimization Matrix manipulation Another day, another concept mastered. On to the next challenge! 💪🔥 #coding #leetcode #java #programming #dsa #matrix #problemsolving #500DaysOfCode #Day414
To view or add a comment, sign in
-
-
🚀 Day 69 of My LeetCode Journey 🚀 Problem: Remove Linked List Elements Today’s problem reinforced one of the most important concepts in Linked Lists — safe node deletion using pointers. 💡 What I learned today: Sometimes the approach looks right… …until you realize a tiny mistake in logic is breaking the whole solution. Fixing that one small piece can completely turn the code around. 🧠 Key takeaway: Don’t rush to write code. Sit back → think → visualize → break the problem → then solve. This simple switch saves half the debugging time. #LeetCode #Day69 #CodingJourney #Java #DSA #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Ever wondered what’s really different between a Proc and a Lambda in Ruby? Here’s a quick, practical breakdown you can test in your IRB console 👇 📸 See the example in the image below for reference! 🧩 1. Argument Handling ✅ Proc is easy-going — it doesn’t mind if some arguments are missing. Missing ones just become nil. ⚠️ Lambda is strict — it checks the number of arguments just like a regular method. 🔁 2. Return Behavior 🧠 Lambda: When you use return inside a lambda, it returns only from the lambda itself the method containing it keeps running after the lambda returns. 💥 Proc: When you use return inside a proc, it returns from the whole method right away any code after the proc call will never run.. #Ruby #RubyOnRails #Developers #CodeSnippet #Programming #CodingTips #WebDevelopment #RubyDevelopers #Lambda #Proc #RailsDeveloper #RailsQuestions #ror #RubyRails
To view or add a comment, sign in
-
More from this author
Explore related topics
- Strategies to Achieve Comprehensive Software Test Coverage
- Open Source Testing Tools That Save Time
- How to Establish Test Coverage for New Projects
- How to Reduce Bugs Through Software Testing
- Measuring Test Coverage Beyond Code Metrics
- GitHub Code Review Workflow Best Practices
- Using Test Diversity in Software Testing
- Improving Unit Tests for Consistent Code Quality
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
That's great! I tried contributing to trees in same repo by adding AVL and binary trees, but couldn't pass the checks 😞