🚀 Day 55 | Sorting Algorithms Today, I explored the fundamentals of sorting algorithms as part of my journey with 10000 Coders. 🔹 Bubble Sort • Compares adjacent elements repeatedly • Swaps them if they are in the wrong order • After each pass, the largest element moves to the end 🔹 Selection Sort • Finds the minimum element from the unsorted portion • Places it at the correct position • Gradually reduces the unsorted part 💡 Key Learnings: • Step-by-step understanding of how sorting works • Difference between comparison-based techniques • Importance of nested loops in sorting logic • Basic understanding of time complexity (O(n²)) This session helped me strengthen my foundation in Data Structures & Algorithms (DSA). 🚀 Taking small steps every day to improve my problem-solving and coding skills 💪 #Day55 #Python #SortingAlgorithms #ProblemSolving #10000Coders #PythonJourney #FullStackJourney #LearningDaily
Exploring Sorting Algorithms with Bubble Sort and Selection Sort
More Relevant Posts
-
Day 10: 90-Day Coding Challenge 🚀 Continuing the journey by strengthening my fundamentals in array-based problems and improving problem-solving efficiency. Today’s problem focused on the classic Two Sum problem. The goal was to find two indices in an array such that their values add up to a given target. At first, a brute-force approach using nested loops works, but it results in O(n²) time complexity, which is not efficient for larger inputs. Instead, I used an optimized approach with a HashMap (dictionary): • Iterated through the array once • Stored each number along with its index • Checked if the complement (target - current number) already exists • Returned the indices as soon as a match is found This approach reduces the time complexity to O(n) with O(n) space complexity. Today’s learning highlights: ✅ Understood the importance of optimizing brute-force solutions ✅ Learned how HashMaps improve lookup efficiency ✅ Strengthened problem-solving with single-pass solutions ✅ Improved thinking in terms of time vs space trade-offs Simple problems like these are great for building strong fundamentals and efficient thinking 💡 Excited to keep the momentum going! #90DaysOfCode #DataStructures #Algorithms #Python #CodingJourney #Arrays #HashMap
To view or add a comment, sign in
-
🚀 Day 55 | Sorting Algorithms Continued Today I continued learning sorting algorithms as part of my journey with 10000 Coders. In today’s session, I focused on: 🔹 Insertion Sort • Builds the sorted array one element at a time • Picks an element and places it in the correct position • Similar to sorting playing cards in hand 👉 Key Learning: Efficient for small datasets and nearly sorted arrays 🔹 Merge Sort • Uses Divide and Conquer approach • Splits the array into halves recursively • Merges sorted halves to get final sorted array 👉 Key Learning: • Time complexity: O(n log n) • More efficient than simple sorting algorithms Through this, I understood: • Difference between simple and advanced sorting • How recursion works in Merge Sort • Importance of breaking problems into smaller parts This is helping me strengthen my DSA foundation and algorithm thinking 🚀💪 #Day55 #Python #SortingAlgorithms #MergeSort #InsertionSort #DSA #ProblemSolving #10000Coders #PythonJourney #FullStackJourney #SravanKumarSir
To view or add a comment, sign in
-
🚀 Day 57 | Practical Implementation of Sorting & Searching Today I focused on the practical implementation of the concepts I learned in the last few days as part of my journey with 10000 Coders. I implemented the following algorithms in Python: 🔹 Sorting Algorithms • Bubble Sort • Selection Sort • Insertion Sort • Merge Sort 🔹 Searching Algorithm • Binary Search 💡 What I Practiced: • Writing algorithms step by step • Understanding how data moves during sorting • Implementing recursion in Merge Sort • Using pointers (low, high, mid) in Binary Search • Testing with different inputs and edge cases 🚀 Key Takeaways: • Clear understanding of how sorting algorithms work internally • Difference between O(n²) and O(n log n) approaches • Importance of efficient searching techniques • Improved confidence in implementing DSA concepts Practicing these concepts helped me move from theory to real implementation, which is very important for problem solving 💪 Step by step strengthening my DSA foundation 🚀 #Day57 #Python #SortingAlgorithms #BinarySearch #DSA #ProblemSolving #CodingPractice #10000Coders #PythonJourney #FullStackJourney #SravanKumarSir
To view or add a comment, sign in
-
✅ Day 80 of 100 Days LeetCode Challenge Problem: 🔹 #3876 – Construct Uniform Parity Array II 🔗 https://lnkd.in/gENuCXJc Learning Journey: 🔹 Today’s problem focused on determining whether we can construct an array where all elements are either all even or all odd using allowed operations. 🔹 The key observation was around parity (odd/even nature) of numbers. 🔹 Since we can subtract elements, the parity depends on whether differences can produce consistent odd or even values. 🔹 I simplified the logic by checking: • If the minimum element is odd → we can make all elements odd • Otherwise, verify if all elements are already even Concepts Used: 🔹 Parity (Odd/Even Analysis) 🔹 Mathematical Observation 🔹 Greedy Logic Key Insight: 🔹 Subtracting numbers preserves or changes parity in predictable ways. 🔹 The smallest element plays a crucial role in determining whether all elements can be transformed into the same parity. Complexity: 🔹 Time: O(n) 🔹 Space: O(1) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #SoftwareEngineering #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
✅ Day 89 of 100 Days LeetCode Challenge Problem: 🔹 #1480 – Running Sum of 1D Array 🔗 https://lnkd.in/gSTZrxF7 Learning Journey: 🔹 Today’s problem focused on computing the running (prefix) sum of an array. 🔹 Instead of using an extra array, I optimized the solution by modifying the input array in-place. 🔹 Starting from index 1, I updated each element as: • nums[i] += nums[i-1] 🔹 This way, each index stores the cumulative sum up to that point. 🔹 Finally, returned the modified array. Concepts Used: 🔹 Prefix Sum 🔹 In-place Computation 🔹 Array Traversal Key Insight: 🔹 The previous element already stores the prefix sum, so we can reuse it directly. 🔹 Eliminates the need for extra space while maintaining linear time. Complexity: 🔹 Time: O(n) 🔹 Space: O(1) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
✅ Day 88 of 100 Days LeetCode Challenge Problem: 🔹 #1252 – Cells with Odd Values in a Matrix 🔗 https://lnkd.in/g5eE9A-e Learning Journey: 🔹 Today’s problem focused on simulating row and column increment operations on a matrix. 🔹 I initialized an m × n matrix with all zeros. 🔹 For each index [ri, ci], I incremented: • All elements in row ri • All elements in column ci 🔹 After applying all operations, I traversed the matrix to count how many cells contain odd values. Concepts Used: 🔹 Matrix Simulation 🔹 Nested Loops 🔹 Conditional Counting 🔹 Basic Array Manipulation Key Insight: 🔹 Direct simulation works efficiently due to small constraints. 🔹 Each operation affects an entire row and column, so tracking increments carefully is key. Complexity: 🔹 Time: O(m × n + k × (m + n)) 🔹 Space: O(m × n) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
✅ Day 81 of 100 Days LeetCode Challenge Problem: 🔹 #1897 – Redistribute Characters to Make All Strings Equal 🔗 https://lnkd.in/gZ7wZ7JE Learning Journey: 🔹 Today’s problem required checking if we can redistribute characters so that all strings become identical. 🔹 I combined all strings and used a frequency counter to count occurrences of each character. 🔹 Since we can freely move characters between strings, the only requirement is that each character count must be divisible by the number of strings. 🔹 If any character fails this condition, it’s impossible to evenly distribute it. Concepts Used: 🔹 Hash Map / Frequency Counting (Counter) 🔹 String Concatenation 🔹 Divisibility Check Key Insight: 🔹 The exact arrangement doesn’t matter—only the total frequency distribution matters. 🔹 If every character can be equally divided among all strings, a valid configuration always exists. Complexity: 🔹 Time: O(n * k) (n = number of strings, k = average length) 🔹 Space: O(1) (bounded by alphabet size) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #SoftwareEngineering #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
✅ Day 82 of 100 Days LeetCode Challenge Problem: 🔹 #2906 – Construct Product Matrix 🔗 https://lnkd.in/gdb7GZNB Learning Journey: 🔹 Today’s problem required constructing a matrix where each cell contains the product of all other elements except itself, modulo 12345. 🔹 I flattened the 2D matrix into a 1D list to simplify processing. 🔹 Then I used the prefix and postfix product technique: • pre[i] → product of all elements before index i • post[i] → product of all elements after index i 🔹 Multiplying pre[i] * post[i] gives the required result for each position. 🔹 Finally, I mapped the computed values back into the original matrix shape. Concepts Used: 🔹 Prefix Product 🔹 Postfix Product 🔹 Array Flattening 🔹 Modular Arithmetic Key Insight: 🔹 Using prefix and postfix arrays avoids recomputing products for every cell, reducing time complexity. 🔹 This is an extension of the classic “product of array except self” problem. Complexity: 🔹 Time: O(n × m) 🔹 Space: O(n × m) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #SoftwareEngineering #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
✅ Day 97 of 100 Days LeetCode Challenge Problem: 🔹 #1281 – Subtract the Product and Sum of Digits of an Integer 🔗 https://lnkd.in/gxTAZc6U Learning Journey: 🔹 Today’s problem involved extracting digits of a number and performing two operations simultaneously. 🔹 I initialized two variables: one for product (pr) and one for sum (sm). 🔹 Using a while loop, I extracted each digit using n % 10. 🔹 Updated the product by multiplying the digit and updated the sum by adding it. 🔹 Reduced the number using integer division (n //= 10) after each step. 🔹 Finally returned the difference between product and sum. Concepts Used: 🔹 Digit Extraction 🔹 While Loop 🔹 Arithmetic Operations 🔹 Number Manipulation Key Insight: 🔹 Both product and sum can be computed in a single traversal of digits. 🔹 Efficient use of modulus and division avoids converting the number to a string. Complexity: 🔹 Time: O(d) 🔹 Space: O(1) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
Episode 11: Mastering Python Functions — Write Less, Do More! 🚀🐍 Tired of copying and pasting the same blocks of code? In Episode 11 of our Python Zero to Pro series, we are unlocking the ultimate tool for clean, professional programming: Functions. While variables store data, Functions store actions. They are the building blocks of modular, scalable software. Whether you're building a simple calculator, automating a repetitive data cleaning task, or designing a complex neural network architecture, Functions allow you to write code once and reuse it infinitely. What’s inside today’s module: ✅ The Power of DRY (Don't Repeat Yourself): Learn why programmers hate repetition and how functions make your code cleaner and more efficient. ✅ Defining with def: Master the syntax for creating your own reusable blocks of code using the def keyword. ✅ Function Arguments: Go beyond static code! Learn how to pass information (names, numbers, data) into your functions to make them dynamic and flexible. ✅ Default Values: See how Python handles missing information by setting smart default arguments. ✅ The "Call" Logic: Understand how to trigger your functions at the exact moment you need them in your program. ✅ Real-World Efficiency: From personalized greeting systems to automated data processing, see how functions form the skeleton of every modern application. 🔗 Access the Ecosystem Here: 📂 GitHub (Code & Roadmaps): https://bit.ly/4utEK8m 🧪 Kaggle (Research Lab & Datasets): https://bit.ly/4sBjImu 🌐 Official Website: https://ailearner.tech 📺 Full Video Course (YouTube): https://bit.ly/4bmOW9J 📖 Exact Notebook Folder: https://bit.ly/3PAWNt5 How to Level Up with Us: Follow my profile for daily modules as we march toward AI mastery in 2026. Star the GitHub repo to keep your "AI Engineer Roadmap" updated and accessible. Comment "FUNCTION" below once you’ve completed today's exercises! I’ll be jumping in to check your progress and answer questions. Let’s keep building the future, one reusable block of code at a time. 💻🔥 #Python #AiLearner #AI2026 #MachineLearning #PythonSeries #DataScience #CodingLife #SoftwareEngineering #CleanCode
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