🌟 Day 4 — 21 Days Problem Solving Challenge 🌟 This post isn’t extraordinary — it’s just a small part of my learning story. Today, I faced lots of challenges, got stuck many times, and spent hours trying to solve problems. But in the end, I solved them all by myself — no AI, no Google, just pure logic and patience. The challenge was to solve everything without using any string or Math functions — only pure mathematics. Here’s what I worked on today 👇 1️⃣ Split Number into Digits Input: N = 12345 → Output: [1, 2, 3, 4, 5] 2️⃣ Remove the Decimal Point (Mathematically) Input: N = 12.34 → Output: 1234 3️⃣ Separate Whole and Fractional Parts Input: N = 5.75 → Output: Whole = 5, Fraction = 0.75 4️⃣ Count Whole and Fractional Digits Separately Input: N = 12.345 → Output: Whole Count = 2, Fraction Count = 3 5️⃣ Generate a Decimal Number from Whole and Fractional Digits Input: Whole = [1, 2], Fraction = [3, 4] → Output: 12.34 6️⃣ Check if a Number is a Palindrome Input: N = 121 → Output: Palindrome 7️⃣ Check if a Number is an Armstrong Number Input: N = 153 → Output: Armstrong Number ✨ Example: 1³ + 5³ + 3³ = 153 This series is really helping me sharpen my logical thinking and improve how I approach problems. If you’re an absolute beginner and want to take your problem-solving skills to the next level, I highly recommend checking out Anurag Singh’s free YouTube series. Every day is a new challenge, a new lesson, and a small victory. #WebDevelopment #FrontendDevelopment #WebDeveloper #JavaScript #HTML #CSS #ReactJS #React #TailwindCSS #Tailwind #Coding #Programming #100DaysOfCode #LearningJourney #ProjectTips #CodeChallenge #LearningToCode #BuildInPublic #CodingTips #CareerGrowth #Innovation #Technology #WebDesign #DevProjects #LogicBuilding #JSLogic
More Relevant Posts
-
How Binary Search Actually Works (with Visual Intuition) 🧠 Hook: Have you ever searched for a name in your contact list — and found it almost instantly? 📱 That’s not magic — that’s Binary Search quietly doing its job. ⚡ 📚 The Intuition: Imagine a sorted bookshelf with hundreds of books. You’re looking for “MERN Mastery”. You don’t start checking every single book from left to right, right? Instead, you open the shelf around the middle and see what book is there. If “MERN Mastery” comes before that book alphabetically → you only look in the left half. If it comes after → you only search the right half. You repeat this process, cutting your search space in half each time. Within just a few steps, you’ve found the exact book. 📖 That’s Binary Search — divide, compare, and conquer. 🔍 The Magic Behind It: Every step reduces the number of possible options by half. So, for a list of: 1000 elements → only ~10 steps 1,000,000 elements → only ~20 steps That’s the beauty of thinking logarithmically. 🪄 Where It Shows Up in Real Life: Searching a contact or file name 🔠 Autocomplete suggestions on search bars 🔍 Database queries and indexing 📁 Game leaderboard rankings 🎮 💭 Takeaway: Binary Search teaches one of the most powerful problem-solving lessons: Don’t check everything — eliminate intelligently. 💬 Engagement Prompt: If you had to explain Binary Search to a child using a real-life example — what would you pick? 👇 #BinarySearch #DataStructures #Algorithms #DSA #ProblemSolving #TechLearning #CodingJourney #ComputerScience #Programming #DeveloperCommunity #MERN #JavaScript #FrontendDevelopment #BackendDevelopment #WebDevelopment #CodeNewbie #LearnToCode #TechEducation #SoftwareEngineering #CareerInTech
To view or add a comment, sign in
-
-
🔥 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗖𝗼𝗱𝗶𝗻𝗴 — 𝗙𝗶𝗹𝗲 𝗦𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 𝗣𝗿𝗼𝗯𝗹𝗲𝗺 Got inspired after watching Akshay Saini 🚀’s Machine coding series — and decided to take on a fun machine coding challenge: Building a file explorer from scratch. 𝗣𝗿𝗼𝗯𝗹𝗲𝗺 𝗦𝘁𝗮𝘁𝗲𝗺𝗲𝗻𝘁 👇 ✅ Render a tree-structure from JSON (folders/files with expand-collapse) ✅ Add new files or folders dynamically at any level ✅ Keep everything sorted alphabetically — folders first, then files 𝗧𝗲𝗰𝗵𝗻𝗶𝗾𝘂𝗲𝘀 𝗜 𝘂𝘀𝗲𝗱: 1. Recursive function to render nested structures. 2. React Context API to manage shared states (active folder, add mode, etc). 3. Pure immutable state updates using structured cloning for clean re-renders. 4. Smart sorting logic — folders and files handled separately and merged elegantly. 💻 𝗟𝗶𝘃𝗲 𝗱𝗲𝗺𝗼 : https://lnkd.in/gJapscTm 🔗 𝗚𝗶𝘁𝗛𝘂𝗯 (𝗰𝗼𝗱𝗲): https://lnkd.in/gCnpu39P 🎥 𝗔𝗸𝘀𝗵𝗮𝘆'𝘀 𝗬𝗧 𝘃𝗶𝗱𝗲𝗼: https://lnkd.in/gXch9JKE 𝗗𝗿𝗼𝗽 𝘆𝗼𝘂𝗿 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀 👇 — 𝘄𝗼𝘂𝗹𝗱 𝗹𝗼𝘃𝗲 𝘁𝗼 𝗱𝗶𝘀𝗰𝘂𝘀𝘀 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗮𝗽𝗽𝗿𝗼𝗮𝗰𝗵𝗲𝘀! #ReactJS #MachineCoding #FrontendDevelopment #JavaScript #CleanCode #WebDevelopment #SoftwareEngineering #CodingInterview #Learning
To view or add a comment, sign in
-
Ever wondered how searching in a sorted array can go from slow to lightning fast? ⚡🔍 Hey everyone! Day 290 of my 365-day coding journey, and today I focused on a fundamental algorithm: LeetCode's "Binary Search." Understanding search algorithms is crucial for efficient data retrieval, and this problem is a perfect way to strengthen that skill. Let’s dive in! 🛠️ The Problem Given a sorted array of integers nums and a target value, the task is to search for the target in nums. If the target exists, return its index; otherwise, return -1. The array is guaranteed to be sorted in ascending order. 🎯 The Approach Solution 1: Linear Search - Iterate through each element from start to end. - Compare each element with the target; return the index if matched. - Simple, but O(n) time complexity makes it inefficient for large datasets. Solution 2: Binary Search - Much more efficient for sorted arrays. - Use two pointers, left and right, to track search boundaries. - Calculate mid, compare nums[mid] with target, and adjust pointers accordingly. - Repeat until target is found or pointers cross. - O(log n) time complexity makes it ideal for large datasets. ⚡ 🧠 Key Takeaways - For sorted data, always consider Binary Search first due to its logarithmic efficiency. - Understanding midpoint calculation and pointer adjustments is critical for correct implementation. - Linear search is simple but quickly becomes inefficient as input size grows. 💡 Challenge for you! Can you think of scenarios where linear search might still be better than binary search, even though the latter is faster? Share your thoughts! 💬 📺 Check out my video walkthrough I demonstrate both methods and discuss their nuances in detail: https://lnkd.in/dk89dtnJ 🔥 Join the Conversation If you’re sharpening your algorithms skills or tackling daily coding challenges, let’s connect! Always great to learn and share with fellow developers. 🚀 #CodingJourney #DSA #Algorithms #BinarySearch #LeetCode #JavaScript #ProblemSolving #DataStructures #Programming #DeveloperLife #LearningEveryDay #CodeNewbies
To view or add a comment, sign in
-
-
𝗙𝗶𝗿𝘀𝘁 𝗧𝗶𝗺𝗲 𝗘𝘅𝗽𝗹𝗼𝗿𝗶𝗻𝗴 𝗕𝗶𝗴 𝗢 𝗡𝗼𝘁𝗮𝘁𝗶𝗼𝗻 ⚙️ In my Next Level Bootcamp, we recently started learning about Big O Notation — so I decided to go for a deep dive into this concept for the first time. 🎥 Watched a few YouTube videos, 📚 read articles, and explored how it connects with JavaScript performance. And wow — it’s a total game changer when you start seeing code through complexity instead of just execution. ⚡ 📊 Common Time Complexities (Big O Notation): - 🟩 O(1) → Constant Time → e.g., Accessing an array element - 🟨 O(log n) → Logarithmic Time → e.g., Binary Search - 🟦 O(n) → Linear Time → e.g., Single loop - 🟧 O(n log n) → Linearithmic Time → e.g., Merge Sort, Quick Sort - 🟥 O(n²) → Quadratic Time → e.g., Nested loops - ⚠️ O(2ⁿ) → Exponential Time → e.g., Recursive Fibonacci - 🚫 O(n!) → Factorial Time → e.g., Permutation generation 🧠 My biggest takeaway: Time complexity isn’t about how fast your code runs — it’s about how your code scales when the input grows. This single concept completely shifts how you approach problem-solving and algorithm design. 💡 #JavaScript #WebDevelopment #CodingJourney #BigONotation #LearningInPublic #NextLevelBootcamp
To view or add a comment, sign in
-
-
🔽 Day 166 of #200DaysOfCode Today, I continued sharpening my fundamentals by implementing Bubble Sort in descending order — without using JavaScript’s built-in .sort() method. 💡 While sorting might look simple on the surface, it is one of the most essential concepts in programming — powering search algorithms, intelligent ordering systems, real-time data processing, and more. By writing this logic manually, I reinforced: ✅ How comparisons work inside loops ✅ Value swapping and index manipulation ✅ Time complexity analysis (O(n²) for Bubble Sort) ✅ Why optimized sorting algorithms matter in bigger datasets 🌱 Every advanced concept in Data Structures & Algorithms is built on these fundamentals — and revisiting them helps improve clarity, confidence, and coding discipline. 🔁 Progress in programming isn’t linear — it’s iterative. Master the basics, and everything else becomes easier. #JavaScript #166DaysOfCode #BubbleSort #Algorithms #WebDevelopment #DSA #CodingChallenge #ProblemSolving #LearnInPublic #DeveloperMindset
To view or add a comment, sign in
-
-
Patterns I hear it repeatedly, "Pick out the patterns." When solving coding problems this definitely rings true. Honestly it rings true in the world of nursing where I was originally from as well. When you sat down at the computer for your nursing license test it did not matter how many questions you practiced and how much of each medical problem you knew. That is not what got me or anyone else through. You have to realize the PATTERN. It was not always what they were asking, but how they were asking it. What details are they purposefully putting in the question or purposefully leaving out. Thinking out the problem, before looking at any answers provided to choose from. Very thankful for other coders who share what they have learned and what worked for them. I hope this post helps someone along their journey like it did me.
75K+ LinkedIn Fam | Brand Partnership | Helping Brands Go Viral Organically, Grow | AI, Tech & Marketing Content | 25+ Brand collabs | Tech Consulting | Engineer | 100M+ Views | Open for Collaborations & Promotions
𝗠𝘆𝘁𝗵: “𝗬𝗼𝘂 𝗻𝗲𝗲𝗱 𝘁𝗼 𝘀𝗼𝗹𝘃𝗲 𝟱𝟬𝟬+ 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀 𝘁𝗼 𝗰𝗿𝗮𝗰𝗸 𝗙𝗔𝗔𝗡𝗚.” Reality? In interviews, you’ll rarely face more than: 👉 8–10 Array/String Style questions 👉 15–20 Tree/Graph Style questions 👉 20–30 DP Style questions That’s it. You don’t need to grind endlessly. You need to spot patterns. When I was preparing, I made this mistake → grinding question after question, hoping numbers would guarantee success. It didn’t. ❌ Here's what actually works: ☑️ Solve 5–6 core problems per pattern until you can code them blind ☑️ Arrays → two-pointers, sliding window, prefix sums ☑️ Trees → DFS/BFS variations (Level Order, LCA, Number of Islands) ☑️ DP → start with 1D (Climbing Stairs), move to 2D (Unique Paths), then Knapsack Pattern recognition beats problem count every single time. And Leeco made this shift way easier for me - an AI LeetCode guide that makes you focus on patterns, not problem count: https://lnkd.in/gNDrzcGP Instead of letting you hop between random problems, it ensures you actually understand what you're solving. 💯 When I was stuck on 'House Robber,' I couldn't see the pattern. Leeco asked: 'What if robbing the current house means you can't use the previous one?' That one question helped me see the choice at each step. ✅ Stop chasing 500 problems. Start mastering 50 patterns with Leeco. Good luck with your prep! JavaScript Mastery #dsapatterns #leetcode #dsatips #paidpartnership #dsainterviews #DSA #codingmentor #datastructures #programming #coding #programmer #algorithm #java #datastructure #python #javascript #coder #computerscience #algorithms #datastructuresandalgorithms #codinglife #coders #webdevelopment #software #dsa #codingbootcamp #developer #learn #programmers #softwaredeveloper #datascience #technology #with #programminglife #re #programmingmemes #html
To view or add a comment, sign in
-
📚 Understanding Time & Space Complexities (The “Big O” Basics) When we write code, we care about two things: 1️⃣ How much time our program takes. 2️⃣ How much memory (space) it uses. Here’s a quick, no-jargon guide to the different types of complexities: ⚡ O(1) – Constant: No matter how big your input is, the time stays the same. Example: Accessing array[0] or checking if a number is even. 📈 O(log n) – Logarithmic: Time increases slowly as inputs grow. Example: Binary Search (it keeps cutting the problem in half). 🚶 O(n) – Linear: Time grows directly with your data size. Example: Looping through an array once to find the largest number. 🧩 O(n log n) – Linearithmic: A bit slower than linear, but still efficient. Example: Merge Sort or Quick Sort. 💥 O(n²) – Quadratic: Gets slower quickly, often due to nested loops. Example: Bubble Sort or Insertion Sort. 🧮 O(n³) – Cubic: Even slower — usually three nested loops. 🧠 O(2ⁿ) – Exponential: Doubles in time with each extra input. Example: Recursive Fibonacci. 😰 O(n!) – Factorial: The slowest! Used in complex tasks like checking all permutations (e.g., Traveling Salesman Problem). The smaller your “Big O,” the faster and more efficient your code is. 🚀 Learning this helps you think like a problem solver — not just a coder! #DSA #BigO #LearningInPublic #Coding #Education #ProblemSolving #FrontendDevelopment #JavaScript #WebDev
To view or add a comment, sign in
-
Charlett-Lorel 🇩🇪 from Germany recently completed the SheCodes Plus AI Workshop, part of the SheCodes Front-end package, a 100% online program designed to teach women how to build beautiful, interactive websites using HTML, CSS, JavaScript, and AI tools. 🚀 After previously exploring Python, Charlett-Lorel decided to level up her skills by diving into JavaScript and front-end development with an AI twist. “The SheCodes Plus AI Workshop was a great way to brush up on my knowledge of working with AI tools as I had previously taken the Python AI workshop. While some of the topics around AI and prompt writing were familiar, this course gave me the chance to apply them using JavaScript instead. I especially appreciated the hands-on approach to API integration and front-end development. As a final project, I created an AI poem generator, which brought together everything we covered in a practical and creative way. It was a worthwhile experience for deepening my understanding of AI in a new coding environment.” We’re so proud of you, Charlett-Lorel! Keep building amazing things 💪 👉 Check out more testimonials like these at: https://lnkd.in/dxgNvt5t #WomenInTech #Coding #SheCodes #LearnToCode #FrontEndDeveloper #CodingWorkshop
To view or add a comment, sign in
-
-
Day 113: Deep Dive into Core JavaScript & DSA Fundamentals! I spent today drilling into fundamental programming concepts, using multiple approaches for each problem to maximize my understanding and coding flexibility. This is the crucial prep work before jumping back into advanced Data Structures and Algorithms. 🎯 Today's Focus Areas: String Manipulation: Implemented String Reversal using four distinct methods: Built-in methods (.split(), .reverse(), .join()) Iterative for loop Recursion with substring() Recursion with slice() (and noted the difference between slice and substring on negative indices!) Mathematical Logic: Factorial Finder: Solved iteratively and recursively. Sum of Digits: Solved using string conversion, iterative while loop, and recursion. Power Calculation and Simple Interest Calculation. Conditional & Array Logic: Created a precise function to check for a Leap Year (year % 4 == 0 && year % 100 !== 0 || year % 400 == 0). Found the Biggest Number in an array without using the .sort() method, then compared it with Math.max(). Implemented robust Palindrome Checkers (for individual words and for finding all palindromic substrings). Wrote functions for Vowel/Consonant Counting, Finding Factors, and Calculating Average. Determined the Smallest of Three Numbers using conditional operators and Math.min(). It's been a great exercise in code efficiency and algorithmic thinking. Feeling much more confident and ready to accelerate into my DSA curriculum soon! #JavaScript #DSA #CodingChallenge #ProblemSolving #FullStack #Day113 #LearningInPublic
To view or add a comment, sign in
-
The Evolution Of Iteration: This image is a funny programming meme that humorously compares different ways developers handle iteration in code — showing how “brain power” supposedly increases with more complex or functional approaches. Here’s the breakdown: 🧠 using a for loop – The most basic and traditional way to iterate. Represents beginner or standard thinking. 💡 using a while loop – Slightly more flexible but still a common approach. Shows an “upgrade” in problem-solving. ⚡ using recursion – A more advanced concept where a function calls itself. Often seen as a clever or “brainy” method. 🌌 using map and lambda – Represents “galaxy brain” thinking — using functional programming techniques (like map() and anonymous lambda functions) to make code concise, elegant, and modern. In short: ➡️ The meme humorously suggests that as your coding style evolves — from for → while → recursion → map/lambda — your “intelligence level” increases From loops to lambda — every coder’s brain evolves differently . Which one are you using today? #JavaScript #Python #ProgrammingHumor #CodingMeme #DevelopersLife #CodeLogic #FunctionalProgramming #Recursion #MapAndLambda #LearnToCode #SoftwareDevelopment #ProgrammerHumor #TechMeme #WebDevelopment #CodingFun #DeveloperCommunity #CodeDaily #CleanCode #ComputerScience #CodingJourney #Innovation #Creativity #Technology #Startups #Management #Entrepreneurship
To view or add a comment, sign in
-
More from this author
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