🗓 Day 4 / 100 – #100DaysOfLeetCode 📌 Problem 728: Self Dividing Numbers The task was to find all numbers in a given range that are self-dividing — i.e., numbers that are divisible by each of their digits and contain no zero. 🧠 My Approach: Iterated through the range of numbers. Checked each digit of a number to ensure: It’s non-zero. The original number is divisible by that digit. Collected all numbers that satisfied both conditions. ⏱ Time Complexity: O(n × d) — where d is the number of digits in each number. 💾 Space Complexity: O(1) 💡 Key Learning: This problem strengthened my understanding of digit-wise iteration and conditional logic — simple concepts that are essential for handling number-based and math-intensive problems efficiently. Small problems like these build the habit of writing clean, readable, and logical code — one step closer each day 🚀 #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #LogicBuilding #Programming #DataStructures #Algorithms #DSA #CodingJourney #CodingChallenge #CodeEveryday #LearningInPublic #CompetitiveProgramming #DeveloperJourney #TechStudent #CareerGrowth #CodingCommunity #KeepLearning
Solved LeetCode problem 728: Self Dividing Numbers with Python
More Relevant Posts
-
🗓 Day 14 / 100 – #100DaysOfLeetCode 📌 Problem 1437: Check If All 1’s Are at Least K Places Away The goal was to determine whether every pair of consecutive 1s in the array is separated by at least k zeros. 🧠 My Approach: Traversed the array while tracking the index of the previous 1. On encountering a new 1, checked the distance from the last one. If the gap was smaller than k, the condition failed instantly. This single-pass logic keeps the solution efficient and clean. 💡 Key Learning: This problem reinforced the importance of index tracking and using simple arithmetic comparisons to validate structural constraints. It’s a great reminder that not all problems require heavy algorithms — sometimes, clarity and careful traversal are enough for an optimal solution. Small steps forward build strong reasoning over time 🚀 #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #LogicBuilding #Arrays #Algorithms #DataStructures #DSA #CompetitiveProgramming #CodingJourney #SoftwareEngineering #LearningInPublic #DeveloperJourney #TechStudent #CareerGrowth #CodeEveryday #CodingCommunity #KeepLearning #Programming #TechCareer
To view or add a comment, sign in
-
-
🗓 Day 10 / 100 – #100DaysOfLeetCode 📌 Problem 3228: Maximum Number of Operations to Move Ones to the End The task was to determine the maximum number of operations needed to move all '1's in a binary string to the end, given specific operation rules. 🧠 My Approach: Traversed the string while keeping track of the total count of '1's seen so far. Whenever a '10' pattern appeared, added the current count of '1's to the total operations. This ensured that each move was counted optimally without unnecessary shifts or recomputation. ⏱ Time Complexity: O(n) 💾 Space Complexity: O(1) 💡 Key Learning: This problem reinforced the value of pattern-based logic and prefix counting — powerful techniques for problems involving strings or sequences. It also highlighted how thinking in terms of transitions (1→0) can simplify seemingly tricky problems. Ten days down, ninety to go 🚀 #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #Strings #LogicBuilding #DataStructures #Algorithms #DSA #CodingJourney #CompetitiveProgramming #SoftwareEngineering #LearningInPublic #DeveloperJourney #TechStudent #CodingCommunity #CareerGrowth #CodeEveryday #Optimization #KeepLearning #Programming
To view or add a comment, sign in
-
-
🗓 Day 5 / 100 – #100DaysOfLeetCode 📌 Problem 2006: Count Number of Pairs With Absolute Difference K The task was to count the number of pairs (i, j) in an array such that the absolute difference between the two elements equals k. 🧠 My Approach: Used a hash map (Counter) to store the frequency of each element. For every number, checked how many times num + k (or equivalently num - k) appears. Accumulated the count efficiently without double-counting pairs. ⏱ Time Complexity: O(n) 💾 Space Complexity: O(n) 💡 Key Learning: This problem helped strengthen my grasp of hash maps and frequency-based counting — a powerful pattern that simplifies many pair-count and difference problems. Every problem adds clarity and confidence — one step closer to mastery 🚀 #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #HashMap #DataStructures #Algorithms #DSA #CodingJourney #CodingChallenge #CodeEveryday #CompetitiveProgramming #SoftwareEngineering #LearningInPublic #DeveloperJourney #TechStudent #CodingCommunity #CareerGrowth #KeepLearning #Programmer #LogicBuilding #TechCareer
To view or add a comment, sign in
-
-
🗓 Day 3 / 100 – #100DaysOfLeetCode 📌 Problem 1913: Maximum Product Difference Between Two Pairs The goal was to find the maximum product difference between two pairs of numbers in an array — specifically, the difference between the product of the two largest numbers and the product of the two smallest numbers. 🧠 My Approach: Sorted the array to easily identify the smallest and largest elements. Computed the difference between the product of the two largest numbers and the two smallest numbers. Leveraged sorting for clarity and simplicity in implementation. ⏱ Time Complexity: O(n log n) 💾 Space Complexity: O(1) 💡 Key Learning: This problem reinforced the importance of recognizing when sorting simplifies a problem. Instead of using complex loops or comparisons, a single sort operation can lead to a clean and optimal solution. Every day of this challenge is sharpening my ability to think more analytically and code more efficiently ✨ #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #DataStructures #Algorithms #DSA #Sorting #CodingJourney #CodeEveryday #LearningInPublic #CompetitiveProgramming #SoftwareEngineering #DeveloperJourney #TechStudent #CareerGrowth #CodingCommunity #KeepLearning
To view or add a comment, sign in
-
-
🐍 Python Day 4 — Diving Deeper into Data & Decisions Today was all about sharpening my logical thinking through the use of conditional statements and loops. I explored how Python lets you control the flow of a program — making it smarter, faster, and more efficient. What I learned: How if, elif, and else shape decision-making in code Nested conditions for complex logic The power of for and while loops is truly remarkable, enabling us to automate repetitive tasks and make our code more efficient. 🔥 What I tried: Created mini programs like: Checking even/odd numbers in a range A number-guessing game Basic pattern printing (finally got those stars aligned ⭐) 💪 Difficulty faced: Debugging infinite loops — lesson learned: always include a clear exit condition 😅 ✨ Takeaway: Every “error” is just a clue pointing me closer to the solution. The key is to keep coding, refine your approach, and continue learning. #Python #CodingJourney #Day4 #LearnToCode #LogicBuilding #Programming #100DaysOfCode #WomenInTech #PythonLearning
To view or add a comment, sign in
-
-
Wanna add 5 + 5? Easy 👇 z = 5 + 5 print(z) But of course, users shouldn’t have to learn Python just to add two numbers That’s why engineers came up with a way to take input directly from the user — without writing any code! And that’s the first step in building a real calculator 🧮💻 🎥 Discover the solution in the first episode of the series: How to Take Input from the User – Part 1 #Python #Programming #Learning #Coding #Developers #SoftwareEngineering #PythonBeginners #ISchool #CalculatorProject
To view or add a comment, sign in
-
🚀 Day 4 – LeetCode Problem Solving Journey 💻 Today’s challenge was “Merge Sorted Array” (LeetCode #88) — a classic array manipulation problem that helps improve understanding of two-pointer techniques and in-place merging. Problem: You are given two sorted arrays, nums1 and nums2, and the task is to merge them into a single sorted array, stored inside nums1. Example: Input: nums1 = [1,2,3,0,0,0], m = 3 nums2 = [2,5,6], n = 3 Output: [1,2,2,3,5,6] 🧠 Concept Used: Two-pointer approach starting from the end Comparison and in-place insertion Time Complexity: O(m + n) Space Complexity: O(1) Learning how to handle in-place data modification efficiently is a key step in mastering DSA! #LeetCode #Day4 #ProblemSolving #DSA #CodingJourney #100DaysOfCode #Python #Programming #DevelopersCommunity #SoftwareEngineering #LearningInPublic #CareerGrowth
To view or add a comment, sign in
-
-
✅Day 83 of #100DaysOfLeetCode 1.📌Problem: Find the Pivot Integer Given a positive integer n, find the pivot integer 𝑥 such that the sum of all elements between 1 and 𝑥 inclusively equals the sum of all elements between 𝑥 and n inclusively. Return the pivot integer 𝑥. If no such integer exists, return -1. 2.🟢 Difficulty: Easy 3.📍Topic: Arithmetic & Basic Reasoning 4.🎯 Goal: Identify the integer x where the sum of numbers before and after (including) 𝑥z are equal for a given range.image.jpg 5.🧠Key idea: Approach 1: Find the total sum of numbers from 1 to n using 𝑛(𝑛+1). Incrementally compute the prefix sum from 1 up to 𝑖 and compare it with the suffix sum from 𝑖 to n. If prefix sum equals suffix sum for any i, that 𝑖 is the pivot integer; otherwise, return -1. #LeetCode #100DaysOfCode #CodingChallenge #Programming #DataStructures #Algorithms #CodingJourney #LearningJourney #GrowthMindset #ProblemSolving #DeveloperCommunity #Python #Java #SoftwareEngineering #TechCareersbest
To view or add a comment, sign in
-
-
🚀 Day 54 of #100DaysOfCode Solved LeetCode Problem 2011. Final Value of Variable After Performing Operations ✅ This problem tests simple yet essential programming logic — understanding how pre/post increment and decrement operations affect variable states. Given a list of operations like ["--X", "X++", "++X"], the goal is to compute the final value of X after applying all updates sequentially. 💡 Key Insight: Each operation (++X, X++) increases the value by 1, while (--X, X--) decreases it by 1. The implementation can be efficiently handled in O(n) time by iterating through the operations once. ⚙️ Result: Runtime: 0 ms ⚡ Beats 100% of Python submissions Memory Usage: 17.76 MB (Beats 60.70%) Another step forward in improving my algorithmic problem-solving and code optimization skills 💪 #LeetCode #Python #100DaysOfCode #CodingJourney #ProblemSolving #DailyPractice #TechLearning #MythylyCodes
To view or add a comment, sign in
-
-
The best programmers don’t memorize code; they understand concepts, build from first principles, and then refine with Pythonic optimizations. At The Learn Programming Academy, every lesson follows a proven learning pattern: Concept → Code → Pythonic Optimization. You’ll first grasp how a data structure works: arrays, queues, heaps, trees. Then, you’ll build it from scratch, reinforcing problem-solving and logic design. Finally, you’ll learn how Python’s built-in tools: sorted(), heapq, deque, queue making your code cleaner, faster, and more professional. This isn’t rote memorization. It’s real understanding, the kind that prepares you for interviews, real-world projects, and long-term mastery. Because coding isn’t about writing more lines, it’s about knowing why each line matters. #learnprogramming #pythoncourse #datastructures #algorithms #pythonlearning #timbuchalka #softwareengineering #python #coding #ProgrammingEducation #LearnToCode #programmingtips
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