🚀 Day 59 of #100DaysOfCode Today I worked on a classic problem: Converting Time into Words (C Programming) ⏰ It sounds simple — but it really tests your: ✅ Conditional logic ✅ Edge case handling ✅ String formatting ✅ Problem understanding For example: 5:47 → thirteen minutes to six 3:00 → three o' clock 7:15 → quarter past seven This problem reminded me that: 👉 Clean logic > Complex logic 👉 Edge cases matter a lot 👉 Small problems improve big thinking As a developer, mastering fundamentals in C strengthens problem-solving skills for any language — whether it’s JavaScript, Java, or backend development. Consistency is the real power. 59 days done. Still building. 💪 #Day59 #100DaysOfCode #CProgramming #ProblemSolving #CodingJourney #DeveloperGrowth #Consistency
Coding Challenge: Converting Time to Words in C
More Relevant Posts
-
🚀 Day 14 of My LeetCode Journey Today I solved an interesting problem on LeetCode: “Check if Binary String Has at Most One Segment of Ones.” 🧠 Problem Statement: Given a binary string, check whether it contains at most one continuous segment of '1's. 📌 Example: Input: "111000" → ✅ True Input: "110011" → ❌ False 💡 Key Idea: If the string contains "01", it means the sequence of `1`s ended and `0`s started. If another `1` appears later, there are multiple segments of `1`s, which makes the answer false. 🎯 Learning: Many coding problems become easier when we look for patterns instead of writing complex logic. Consistency is the key to improving problem-solving and programming skills. #LeetCode #Java #CodingJourney #ProblemSolving #100DaysOfCode #SoftwareDevelopment
To view or add a comment, sign in
-
-
Problem Solved Today 💡 Today I solved a basic problem on Arrays, and it taught me something important. 📌 Problem: Find the largest element in an array 📌 Approach: Used a simple loop to compare elements 📌 Language: C / Java 👉 What I learned: Instead of jumping to complex solutions, sometimes simple logic works best. Coding is not about writing big code, it’s about clear thinking. Small steps every day = big improvement over time 🚀 #CodingJourney #ProblemSolving #Java #CProgramming #DataStructures #LearnToCode #FutureEngineer
To view or add a comment, sign in
-
🚀 Day 19 of my Java DSA Journey Today I solved Decode Ways — LeetCode Problem #91. 🔹 Problem A message containing digits can be decoded using the mapping: 1 → A 2 → B ... 26 → Z The task is to determine how many possible ways the string can be decoded. 🔹 Approach Used: Dynamic Programming Idea • At each position we check two possibilities • Decode a single digit (1–9) • Decode two digits together (10–26) By storing previous results, we avoid recomputing overlapping subproblems. 📊 Complexity • Time Complexity: O(n) • Space Complexity: O(n) 💡 Key Learning This problem introduces Dynamic Programming, where we store intermediate results to efficiently compute the final answer. 🔗 GitHub Solution https://lnkd.in/gW8atfqw Each day of practice is helping me improve my algorithmic thinking and problem-solving skills. #Java #DSA #LeetCode #DynamicProgramming #CodingJourney
To view or add a comment, sign in
-
-
✨DAY-16: 💻 From Messy Variables to Clean Arrays – The Power of Smart Coding! This meme perfectly shows the difference between writing code without arrays and using arrays in Java. 🔴 Without Arrays: Java Copy code int mark1 = 86; int mark2 = 71; int mark3 = 90; int mark4 = 65; 👉 Too many variables 👉 Hard to manage 👉 Not scalable 👉 Messy and inefficient Imagine handling 100 student marks like this 😅 🟢 With Arrays: int[] marks = {86, 71, 90, 65, 79}; ✅ Organized ✅ Easy to access using index ✅ Simple to loop ✅ Clean and scalable Arrays help us store multiple values of the same type in a single variable, making our code structured and efficient. 📌 Daily Life Lesson: When things are unorganized, life feels stressful. When structured properly, everything becomes simple and productive. Learn concepts clearly — code smarter, not harder 🚀 #Java #Programming #Arrays #CodingLife
To view or add a comment, sign in
-
-
Day 11/100 Day Coding Challenge Today, I solved the LeetCode problem: Container With Most Water using Java. Here’s a detailed breakdown of my approach and learning: Problem Statement: Given an array of non-negative integers representing heights of vertical lines on a coordinate plane, find two lines that, along with the x-axis, form a container that holds the maximum water. Challenges: A brute-force approach would check all possible pairs of lines (O(n²)), which is inefficient for large arrays. I aimed for an optimized solution using the two-pointer technique. Approach (Two-Pointer Technique): Initialize two pointers: l at the start, r at the end of the array. Compute the current area: curWater = (r - l) * min(height[l], height[r]). Update maximum area found so far. Move the pointer pointing to the shorter line inward: If height[l] < height[r], increment l. Else, decrement r. Repeat until the pointers meet. #100DaysOfCode #Java #LeetCode #TwoPointerTechnique #ProblemSolving #Algorithms #SoftwareEngineering #Day11
To view or add a comment, sign in
-
-
Solved LeetCode 1009 – Complement of Base 10 Integer today. In simple terms, the problem asks us to flip every bit of a number’s binary representation — change all 0s to 1s and all 1s to 0s — and then convert it back to a decimal number. The key idea was to create a bit mask of all 1s with the same length as the number’s binary form, and then use the XOR (^) operation to flip the bits. A small problem, but a good reminder of how powerful bit manipulation can be in programming. #LeetCode #DSA #Java #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
LeetCode Problem || Find All Possible Stable Binary Arrays II (3130)🚀 🔹 Problem Idea: We are given a number of 0s and 1s and a constraint called limit. The goal is to count the number of possible binary arrays such that no more than limit consecutive identical elements appear. 🔹 Approach: I used Dynamic Programming to track the number of valid arrays formed with: i zeros j ones and the last placed element (0 or 1). The DP state helps ensure that the consecutive limit condition is maintained while building the array. Always enjoying the process of learning and improving problem-solving skills! 💡 #LeetCode #DynamicProgramming #ProblemSolving #Java #CodingPractice #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day 7 – Inheritance in Java Today I learned about Inheritance, one of the core pillars of Object-Oriented Programming. Inheritance allows one class to acquire the properties and methods of another class using the extends keyword. It helps in: 🔹 Code reusability 🔹 Reducing redundancy 🔹 Creating logical class relationships For example, I created a base class and extended it to a child class to understand how methods and variables are inherited and reused. This concept made me realize how real-world applications are structured efficiently using OOP principles. Slowly moving from writing programs → to understanding software structure 💻 #Java #OOP #Inheritance #Day7 #LearningInPublic #ComputerScience
To view or add a comment, sign in
-
-
Day 8 — Array problems Searching & basic operations Method practice (modular coding) Big shift: Stopped writing everything in one block. Started breaking problems into functions. Less chaos. More structure. Day 9 tomorrow. #LearnInPublic #Java #BuildInPublic
To view or add a comment, sign in
-
Day 8 🚀 Understanding Code Snippets, Increment (++) & Decrement (--) in Java Sometimes, the smallest operators build the strongest programming foundation. When I started learning Java, concepts like i++ and --i looked simple — but understanding how they actually work made a big difference in writing better logic. 🔹 Code snippets help us focus on one task at a time 🔹 Increment (++) increases value by 1 🔹 Decrement (--) decreases value by 1 🔹 Pre vs Post operators change execution flow 🔹 Widely used in loops, counters & algorithms Mastering these basics improves problem-solving skills and prepares you for interviews and real-world development. 💡 Small concepts. Big impact. What Java concept are you currently learning? #Java #Programming #Coding #JavaDeveloper #LearningJourney #SoftwareDevelopment #TechBasics
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