Solved LeetCode 2169: Count Operations to Obtain Zero

📅 Day 45 of #100DaysOfCode Problem: Count Operations to Obtain Zero (LeetCode 2169) 🧩 Approach: 1️⃣ Used a simple loop while both numbers are greater than zero. 2️⃣ In each step, added num1 / num2 to the count — because instead of subtracting repeatedly, we can do it in one go. 3️⃣ Took modulus to simulate the remainder after multiple subtractions. 4️⃣ Swapped numbers and repeated the process until one hit zero. #100DaysOfCode #LeetCode #DSA #ProblemSolving #Cplusplus #CodingChallenge #Algorithms #Programming #DeveloperLife #CodeNewbie #DailyDSA #MathLogic #SoftwareEngineering #TechCommunity #KeepLearning #GrowthMindset #Motivation #CodingJourney

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories