🔽 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
Implemented Bubble Sort in descending order without JavaScript's built-in sort method.
More Relevant Posts
-
🔼 Day 165 of #200DaysOfCode Today, I revisited a fundamental concept that plays a major role in data structures and algorithm design — sorting an array in ascending order using Bubble Sort (without built-in sort methods). 💡 Modern JavaScript gives us shortcuts like Array.sort(), but when we build the logic manually, we develop a much deeper understanding of: • Pairwise comparison • Value swapping in arrays • Nested looping structure • Time complexity (Bubble Sort → O(n²)) Sorting isn’t just a beginner concept — it’s the backbone of efficient searching, optimization, and real-world computational logic. 🔁 Going back to basics reminds me that advanced problem-solving ability is built on strong fundamentals, not shortcuts. 🌱 Every step forward in coding is supported by the basics we choose to master — and revisit. #JavaScript #200DaysOfCode #CodingChallenge #Sorting #Algorithms #WebDevelopment #DeveloperMindset #LearnInPublic #DSA #ProblemSolving
To view or add a comment, sign in
-
-
🎯 Day 172 of #200DaysOfCode Today’s challenge was all about finding all pairs in an array whose sum equals a given target number — a classic logic-building problem that strengthens both your thinking pattern and problem-solving flow. 💡 While most developers would jump to use built-in methods or advanced structures, I implemented it manually using nested loops — because fundamentals matter the most. 📘 Concepts reinforced today: • Nested loop logic • Pair combination generation • Conditional validation • Edge case handling (no valid pairs found) 🌍 Real-world use cases: ✅ Matching data pairs (like prices or scores) ✅ Detecting patterns in datasets ✅ Implementing basic algorithmic logic for interviews 🔥 The beauty of coding lies in building clarity — not just functionality. Every problem solved sharpens your analytical edge! #JavaScript #172DaysOfCode #ProblemSolving #LearnInPublic #WebDevelopment #CodingChallenge #LogicBuilding #BackToBasics #DeveloperMindset
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
-
📚 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
-
🔍 Day 171 of #200DaysOfCode Today, I implemented a function to check whether a specific value exists in an array — without using built-in methods like .includes(). This challenge helped strengthen my understanding of: • Array traversal using loops • Conditional comparisons • Manual search logic • Returning Boolean results effectively 🌍 Though simple, this concept plays a big role in real-world applications like: ✅ Searching records in a dataset ✅ Validating user inputs ✅ Checking access permissions ✅ Matching values in dynamic arrays 💡 Every “basic” problem hides a core principle that drives advanced algorithms. Mastering small steps leads to giant leaps in logic building! #JavaScript #171DaysOfCode #ProblemSolving #LearnInPublic #BackToBasics #WebDevelopment #CodingChallenge #DeveloperMindset #LogicBuilding
To view or add a comment, sign in
-
-
🧠 Day 11: Merge Sort — Divide, Conquer & Combine Today in my #DSA journey, I explored Merge Sort — a powerful divide-and-conquer algorithm that breaks problems into smaller parts and merges them efficiently. It’s faster than basic sorts like Bubble or Insertion Sort, especially for large datasets. ⚡ Let’s go 🚀 #JavaScript #DSA #LearnInPublic #Developers 1️⃣ Problem Statement: Given an array of integers, sort them in ascending order using Merge Sort . Approach: Divide the array into two halves until each subarray has one element. Recursively sort both halves. Merge the sorted halves into a single sorted array. 💡 Intuition: Just like organizing scattered papers into smaller piles, sorting each pile, and merging them back neatly — Merge Sort does the same with numbers. Time Complexity: O(n log n) Space Complexity: O(n) 2️⃣ Problem Statement: Given two sorted arrays, merge them into a single sorted array using the Merge Sort merge logic. Approach: Use two pointers (one for each array). Compare elements and insert the smaller one into a new array. Continue until all elements from both arrays are merged. 💡 Intuition: Imagine merging two sorted playlists 🎵 — you take the smallest next song from either list and keep merging until both are combined in perfect order. Time Complexity: O(n + m) Space Complexity: O(n + m)
To view or add a comment, sign in
-
🚀 Mastering Array Recursion: Flattening Nested Structures Ever run into a deeply nested array and wished there was a clean, elegant way to make it flat? While built-in methods like Array.prototype.flat() are great, understanding the recursive approach is a fantastic way to sharpen your JavaScript fundamentals and master complex data structures! The Challenge 🤯 We want to transform an array like this: [1, [2, 3], [4, [5, 6]], 7] Into a flat array: [1, 2, 3, 4, 5, 6, 7] The Recursive Solution 🧠 Why Bother with Recursion? 🤔 Fundamental Skill: Recursion is a core computer science concept. Mastering it helps you better understand algorithms, tree traversals, and dynamic programming. Readability: For naturally recursive problems (like nested arrays or tree structures), the recursive solution often mirrors the problem's structure, making the code surprisingly elegant and readable. Interview Readiness: This is a classic coding interview problem designed to test your command of JavaScript and core algorithm design. Keep challenging yourself with these fundamentals! Happy coding! #JavaScript #Recursion #WebDevelopment #CodingChallenge #SoftwareEngineering
To view or add a comment, sign in
-
-
📘 Today’s Learning: Big O Notation 🔍 Today I explored one of the most important concepts in programming — Big O Notation 🚀 Big O helps us understand how efficient our code is — how fast or slow it runs as the size of input grows. It’s all about analyzing time complexity and space complexity. 💡 What I learned & practiced: Understanding O(1), O(n), O(n²) and more Comparing how different data structures like Array and Set perform Experimenting with forEach, map, and loops to see how operations scale with input size Writing small test cases to visualize performance differences 🧠 Key Takeaway: Big O is not about exact speed — it’s about how your algorithm scales. Optimizing for efficiency is what separates good developers from great ones 💪 #BigONotation #TimeComplexity #CodingJourney #JavaScript #LearningEveryday
To view or add a comment, sign in
-
-
💡 Brute Force vs. Mathematical Logic — Which One Wins? ⚔️ Tried a small coding challenge today: 👉 Find two numbers in an array whose sum equals a target (classic 2-sum problem 😎). code: https://lnkd.in/gtRVzcZY 🧠 Observation: Both give the same result — but the mathematical approach is cleaner, faster, and more efficient 💪 Sometimes, it’s not just about solving the problem… It’s about solving it smartly. 🚀 #JavaScript #CodingFun #LogicBuilding #ProblemSolving #WebDevelopment #LearnToCode #Efficiency #DeveloperLife
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
-
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
“You’re literally turning knowledge into power! Respect! 💪📚”