🧠 Day 52 of #100DaysOfCode Today I built a Magic Square Generator in C! ✨ Given an odd number n\geq 3, the program constructs an n\times n grid where the sum of every row, column, and diagonal equals the magic constant. Used the Siamese method to place numbers smartly—moving up and right, wrapping around, and stepping down when blocked. Loved the clean logic and the satisfying symmetry in the final output. Perfect for showcasing matrix manipulation and modular arithmetic! 🔢 Magic Constant: n(n^2+1)/2 📐 Output is neatly formatted for visual clarity. #CProgramming #CodeSymmetry #100DaysOfCode #Day52 #CodingChallenge #LearnByBuilding
More Relevant Posts
-
💡 Day 77 of #100DaysOfCode 💡 🔹 Problem: Majority Element – LeetCode ✨ Approach: Used a sorting-based strategy to quickly identify the majority element. By sorting the array, the middle element naturally becomes the majority — simple, clean, and surprisingly powerful! 🌟 📊 Complexity Analysis: ⏱ Time Complexity: O(n log n) — due to sorting 💾 Space Complexity: O(1) — constant auxiliary space ✅ Runtime: 7 ms (Beats 39.33%) ✅ Memory: 55.75 MB 🔑 Key Insight: Sometimes the smartest solution is also the simplest — a little ordering can reveal the dominant pattern hiding in plain sight. ✨ #LeetCode #100DaysOfCode #ProblemSolving #DSA #AlgorithmDesign #CodingDaily #ProgrammingChallenge #Sorting #LogicBuilding #CodeJourney
To view or add a comment, sign in
-
-
🎯 Day 9 of my #120DaysCodingChallenge 💡 Problem: Palindrome Number (LeetCode – Easy) Given an integer x, the task is to determine whether it reads the same backward as forward. For example: 121 → ✅ Palindrome -121 → ❌ Not a palindrome 10 → ❌ Not a palindrome 🧠 My Approach: I solved this problem using the string conversion method in C for clarity and simplicity. 🔹 First, I handled negative numbers since they can’t be palindromes. 🔹 Then, I converted the integer into a string using sprintf(). 🔹 Using two-pointer logic, I compared characters from the start and end of the string — moving inward until all pairs matched. 🔹 If all corresponding digits matched, the number was a palindrome. ⚙️ Time Complexity: O(n) ⚙️ Space Complexity: O(n) 💬 Takeaway: This problem reinforced how string manipulation and two-pointer logic can simplify palindrome checks. In future, I’ll explore the mathematical approach (without converting to string) for better space efficiency. #Day9 #CodingChallenge #LeetCode #CProgramming #PalindromeNumber #100DaysOfCode #LearningInPublic #ProblemSolving
To view or add a comment, sign in
-
-
🌀 Day 48 of #100DaysOfCode Today I tackled a visually satisfying challenge—generating a Spiral Matrix in C! The program dynamically fills an n x n matrix in a clockwise spiral pattern using boundary pointers (top, bottom, left, right) and a value counter. It’s a great exercise in mastering loop control and matrix traversal. ✨ Highlights: Clean logic using layered loops Dynamic matrix filling without recursion Output beautifully formatted for clarity 🔢 Input: Matrix size n (1–20) 📤 Output: Spiral matrix printed with aligned values 📌 Perfect for practicing: Array manipulation Loop boundaries Visual formatting in C #CProgramming #Day48 #CodingChallenge #LearnByDoing #VisualAlgorithms #CodeCraft
To view or add a comment, sign in
-
My #P99CONF (https://www.p99conf.io/) talk is up! Async programming is tricky, but tinkering and visualization make it click. In this talk, we’ll build an async Rust visualization tool to see how futures really execute, how parallelism differs from concurrency, and what happens when CPU-heavy code sneaks in. Visualization isn’t just pretty graphics. It makes async intuitive and shows how to write more efficient, better-utilized code https://lnkd.in/dQ8jkxE3
P99 CONF 2025 | A Visual Journey Through Async Rust by Alex Puschinsky
https://www.youtube.com/
To view or add a comment, sign in
-
Time for a new UWB demo! Today we bring you powerful tools for evaluation, tuning and product prototyping, centered around the Novelda X7 Ultra Low Power Presence 2D application. With the new Presence2D demo tools you can visualize the outputs, record raw data, adjust application parameters and run playback with the new settings. This allows you to fine tune the settings until you have the performance you want, and gives you insight to what happens under the hood in the radar application. You can also get the application output directly into python with a callback function, either when running live, or in playback while tuning. Get on with application tuning and product prototyping with the Novelda X7 ULPP Presence2D application. Find links to the relevant resources in the comments below👇
To view or add a comment, sign in
-
-
🔵 Day 42 of #100DaysOfCode Today I built a simple yet powerful C program that calculates the missing properties of a circle—radius, circumference, or area—based on user input. 💡 The program uses: fgets() for safer string input switch-case for clean decision logic math.h for square root calculations A custom-defined PI constant for precision 🧮 Whether you input the radius, circumference, or area, the program computes the other two values instantly. It’s a neat way to reinforce geometry concepts while practicing input handling and conditional logic in C. ✅ Feeling more confident with user-driven logic and modular design. Let’s keep the momentum going! #CProgramming #CodeNewbie #LearnToCode #CodingJourney kirti singh
To view or add a comment, sign in
-
📅 Day 63 of #100DaysOfCode Today’s challenge was all about matrix manipulation in C! I built a simple yet powerful program that: ✅ Accepts a 3×3 matrix from user input ✅ Displays the original matrix in formatted output ✅ Computes and prints its transpose by swapping rows and columns This exercise reinforced my understanding of 2D arrays, nested loops, and matrix operations—core concepts in both math and programming. It’s a great stepping stone toward more advanced topics like matrix multiplication and determinants. Let’s keep the momentum going! 🚀 #CProgramming #MatrixTranspose #CodeNewbie #LearnToCode #DailyCoding #CodingChallenge #TechJourney #100DaysChallenge #CodeWithAnmol #VisualCoding #2DArrays #TransposeMatrix #Day63
To view or add a comment, sign in
-
🎯 Day 81 of #100DaysOfCode 🎯 🔹 Problem: Reverse Only Letters – LeetCode ✨ Approach: Used a two-pointer strategy to reverse only the alphabetic characters while keeping all non-letter characters in their original positions. By moving pointers inward and swapping only when both characters are letters, the solution stays efficient and elegant! 🔄✨ 📊 Complexity Analysis: ⏱ Time Complexity: O(n) — each character visited at most once 💾 Space Complexity: O(n) — due to character array construction ✅ Runtime: 0 ms (Beats 100% 🚀) ✅ Memory: 42.96 MB 🔑 Key Insight: Sometimes, all you need is smart pointer movement — not everything needs to be reversed, only the right pieces. #LeetCode #100DaysOfCode #DSA #TwoPointers #StringManipulation #ProblemSolving #CleanCode #AlgorithmDesign #CodingChallenge
To view or add a comment, sign in
-
-
✅ Day 65 of #100DaysOfLeetCode 📌 Problem: Number of Laser Beams in a Bank 🟡 Difficulty: Medium 📍 Topic: Array / String 🎯 Goal: Calculate the total number of laser beams in a bank by counting security device connections between different rows, where beams only form between devices on different rows 🧠 Key Idea: Approach 1: Iterate through each row of the binary matrix, count devices ('1's) in each row, and multiply consecutive non-zero device counts to calculate beams. Track the previous row's device count, and when encountering a new row with devices, multiply it with the previous count to get beams between those rows. Update the previous count only when the current row has devices, then continue to the next row. Trending Hashtags: #100DaysOfLeetCode #LeetCode #CodingChallenge #DSA #DataStructures #Programming #SoftwareEngineering #CodeDaily #TechCommunity #DeveloperLife #ProblemSolving #AlgorithmChallenge #CodingLife #TechSkills #SoftwareDeveloper
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