🔥 Day 90 of My #100DaysOfCode Challenge Today, I worked on the Quicksort Partition Algorithm — a powerful concept from sorting techniques that uses the divide-and-conquer approach. Instead of fully sorting the array, this problem focused on partitioning: 👉 Selecting a pivot (first element) 👉 Dividing the array into: • Elements less than pivot • The pivot itself • Elements greater than pivot 💡 Example: Input: 4 5 3 7 2 Output: 3 2 4 5 7 This challenge helped me understand how the core logic of Quicksort works internally before recursion is applied. 🧠 Key Learnings: ✔ Importance of partitioning in efficient sorting ✔ How Quicksort reduces complexity using divide & conquer ✔ Time Complexity for partition step: O(n) Consistency is building momentum — 90 days strong and still going 💪 #Day90 #100DaysOfCode #CodingJourney #DataStructures #Algorithms #Quicksort #CProgramming #ProblemSolving #DeveloperLife
Quicksort Partition Algorithm: Day 90 of 100 Days of Code
More Relevant Posts
-
🚀 Day 43 of #GeekStreak60 Today’s problem: Painting the Fence (DP) 🎨 Solved a classic Dynamic Programming problem where the goal was to count the number of ways to paint "n" fence posts using "k" colors such that no more than two consecutive posts have the same color. 💡 Learning Takeaway: This problem helped me understand how to break a complex constraint into manageable states. By dividing the problem into two cases — when the last two posts have the same color and when they are different — I was able to build a recurrence relation. It reinforced the idea that many DP problems are about identifying patterns in choices and transitions rather than brute forcing all combinations. ✅ Key Benefits: • Strengthened my understanding of state transitions in DP • Learned how to optimize space by avoiding unnecessary arrays • Improved ability to convert real-world constraints into recurrence relations 📈 Consistency is the real game changer. Showing up daily builds clarity and confidence. 🔥 Current Streak: 43 Days Let’s keep pushing — one problem at a time 💪 #GeekStreak60 #Day43 #DataStructures #Algorithms #DynamicProgramming #CodingJourney #Consistency #PlacementPrep
To view or add a comment, sign in
-
-
🚀 Day 96 of #100DaysOfCode Today, I implemented Counting Sort — a powerful non-comparison sorting algorithm that works efficiently when the range of input values is limited. 💡 Unlike traditional sorting algorithms like QuickSort or MergeSort, Counting Sort doesn’t compare elements. Instead, it counts occurrences and reconstructs the sorted output. 🔍 Key Learnings: • Works in O(n + k) time complexity • Best suited for small range integers • Uses extra space for counting array • Faster than comparison sorts in specific cases 🧠 Approach: Find the maximum value in the array Create a count array to store frequencies Count occurrences of each element Rebuild the sorted array using counts ⚡ Example: Input → 4 2 2 8 3 3 1 Output → 1 2 2 3 3 4 8 📌 This concept is also the foundation for advanced algorithms like Radix Sort. Consistency > Perfection. Learning one concept every day 🚀 #Day96 #CodingJourney #DataStructures #Algorithms #CountingSort #100DaysOfCode #CProgramming #ProblemSolving
To view or add a comment, sign in
-
Rooted WingData on HTB. This one had a really interesting exploitation chain. It involved CVE-2025-4517, a critical Python tarfile vulnerability that allows attackers to bypass extraction filters, ultimately leading to full root access. https://lnkd.in/gCF9AzEM
To view or add a comment, sign in
-
🚀 Day 21 of 100 Days LeetCode Challenge Problem: Flip Square Submatrix Vertically Day 21 brings a clean matrix manipulation problem—simple logic, but important for fundamentals 🔥 💡 Key Insight: We are given: Top-left corner (x, y) Size k 👉 We need to flip the k x k submatrix vertically → Meaning: reverse the order of rows inside that square 🔍 Core Approach: 1️⃣ Identify Submatrix Boundaries Rows: x → x + k - 1 Columns: y → y + k - 1 2️⃣ Swap Rows Vertically Swap: Row x ↔ Row x + k - 1 Row x + 1 ↔ Row x + k - 2 Continue until middle 👉 Only swap elements within column range [y, y + k - 1] 💡 Visualization: Top row ⬇️ becomes bottom Bottom row ⬆️ becomes top 🔥 What I Learned Today: Matrix problems often come down to index manipulation Clear boundary definition avoids mistakes Simple operations can still test precision 📈 Challenge Progress: Day 21/100 ✅ 3 Weeks Consistency Strong! 💪 LeetCode, Matrix Manipulation, Arrays, Simulation, Indexing, DSA Practice, Coding Challenge, Problem Solving #100DaysOfCode #LeetCode #DSA #CodingChallenge #Matrix #Arrays #ProblemSolving #TechJourney #ProgrammerLife #SoftwareDeveloper #CodingLife #LearnToCode #Developers #Consistency #GrowthMindset #InterviewPrep
To view or add a comment, sign in
-
-
🚀 Excited to share my latest project: Dynamic Memory Management Visualizer As part of my Operating Systems learning, I built a web-based tool to simulate and visualize core memory management concepts in an interactive way. 🔍 What the project covers: • Contiguous Memory Allocation (First Fit, Best Fit, Worst Fit, Next Fit) • Paging with Page Replacement Algorithms (FIFO, LRU) • Segmentation with Logical to Physical Address Translation • Virtual Memory Simulation with Page Table Mapping 📊 Key Features: • Real-time memory visualization with color-coded processes • Step-by-step paging table with hit/fault tracking • Interactive segmentation translation with validation • Graphical representation of memory usage and fragmentation • Modular interface for better conceptual understanding 💡 This project helped me deeply understand how operating systems manage memory efficiently and how different algorithms impact performance. 🎥 Project Demo: https://lnkd.in/g5UVPa7Q 🔗 GitHub Repository: https://lnkd.in/gYGN_Jx3 I’d love to hear your feedback and suggestions! #OperatingSystems #MemoryManagement #Python #Flask #ComputerScience #LearningByBuilding #Projects Aman Pandey Vidushi Gupta
To view or add a comment, sign in
-
🚀 Day 95 of #100DaysOfCode Today I explored an interesting concept in sorting algorithms — Comparison vs Non-Comparison Sorting. Most sorting algorithms like QuickSort or MergeSort rely on comparisons, which gives them a lower bound time complexity of O(n log n). But today I learned about Counting Sort, a non-comparison algorithm that can sort data in O(n) time under certain conditions 🔥 💡 Key Idea: Instead of comparing elements, Counting Sort counts the frequency of each value using an auxiliary array. 📌 Example: Input → [1, 1, 3, 2, 1] Frequency → [0, 3, 1, 1] Sorted Output → [1, 1, 1, 2, 3] ✨ When to use Counting Sort? ✔ When range of numbers is small ✔ When elements are integers ✔ When performance matters more than space ⚠ Limitation: ❌ Not suitable for large ranges ❌ Uses extra memory 📈 Time Complexity: O(n) 📦 Space Complexity: O(k) Learning this made me realize that the choice of algorithm depends heavily on the problem constraints, not just theory. Consistency is the key 🔑 #Day95 #CodingJourney #DataStructures #Algorithms #Sorting #100DaysOfCode #Learning #Programming
To view or add a comment, sign in
-
🚀 Day 15 of my DSA Grind Sometimes the best way to optimize a Sliding Window problem is to not use a window at all! Today, I tackled a LeetCode Medium that completely changed how I look at substring counting. 🔹 Number of Substrings Containing All Three Characters (LC 1358): The standard approach here is using a left and right pointer to expand and shrink a window until it contains 'a', 'b', and 'c'. But managing those pointers can get messy. The Breakthrough: I scrapped the traditional window and used the "Last Seen" Index array. I simply tracked the exact index where I most recently saw an 'a', a 'b', and a 'c'. The Math: To form a valid substring ending at my current position, I just need to reach back to the minimum of those three indices. Every single index before that minimum is a valid starting point! The Result: By applying the formula count += 1 + min(last_a, last_b, last_c), I reduced the problem to a single, lightning-fast O(N) pass with strict O(1) space. Zero nested loops, zero pointer rewinding! #DataStructures #Algorithms #LeetCode #CPP #ProblemSolving #SoftwareEngineering #PlacementPreparation #Optimization #100DaysOfCode #TechJourney
To view or add a comment, sign in
-
-
Solved "Maximum Subarray" on LeetCode ✅ • All test cases passed • Runtime: 0 ms ⚡ Approach 🧠:- • Implemented "Kadane’s Algorithm". • Used a running sum to track the current subarray • At each step, compared current sum with maximum sum so far • If the running sum becomes negative, reset it to 0 (since it won’t help in future subarrays) About the Code 💻:- • Initialized `maxsum` with `INT_MIN` to handle negative arrays • Iterated through the array once using a loop • Updated `sum` by adding current element • Used `max()` to continuously track the best answer • Reset condition ensures we always start fresh when needed Complexity 📊:- • Time Complexity: O(n) • Space Complexity: O(1) Takeaway 🎯:- • This is a classic example of optimizing from brute force to linear time • Helps in understanding greedy + dynamic programming patterns --- #LeetCode #Algorithms #Coding #ProblemSolving
To view or add a comment, sign in
-
-
Day 79 on LeetCode Smallest Index With Digit Sum Equal to Index 🔢✅ Keeping the streak going with a simple yet interesting digit manipulation + simulation problem 💯 🔹 Approach Used in My Solution The goal was to find the smallest index i such that the sum of digits of nums[i] equals i. Key idea: • Traverse the array from left to right • For each element, calculate the digit sum • Compare it with the current index • Return the first index where the condition satisfies • If none found → return -1 A clean and direct implementation without overcomplication. ⚡ Complexity: • Time Complexity: O(n * d) (d = number of digits) • Space Complexity: O(1) 💡 Key Takeaways: • Practiced digit extraction using modulo and division • Reinforced writing simple simulation-based solutions • Reminder: not every problem needs optimization — clarity matters 🔥 Consistency maintained, step by step progress continues. #LeetCode #DSA #Algorithms #DataStructures #Arrays #Math #Simulation #ProblemSolving #Coding #Programming #Cpp #STL #SoftwareEngineering #ComputerScience #CodingPractice #DeveloperLife #TechJourney #CodingDaily #Consistency #100DaysOfCode #BuildInPublic #AlgorithmPractice #CodingSkills #Developers #TechCommunity #SoftwareDeveloper #EngineeringJourney
To view or add a comment, sign in
-
-
🔼🔽 30 Days of RStudio Shortcuts: Day 15/30 Welcome to Week 3! Today we're mastering line manipulation and brace navigation – essential shortcuts for reorganizing code and navigating complex nested functions. ⌨️ Line & Brace Shortcuts: Alt + ↑ / Alt + ↓ : Move lines up/down. Reorder your code without cut-paste! Just put your cursor on a line (or select multiple) and move them instantly. Shift + Alt + ↑ / Shift + Alt + ↓ : Copy lines up/down. Duplicate a line or selection above or below. Perfect for repeating similar code patterns! Ctrl + P : Jump to matching brace/paren. Place your cursor on any (, {, or [ and jump to its matching ), }, or ]. Ctrl + Shift + E : Expand to matching brace/paren. Select everything between matching braces – great for extracting nested code blocks! 💡 Pro Tip: The brace navigation shortcuts are lifesavers for debugging complex nested code! Imagine you have a function inside a loop inside an if statement with 5 closing brackets }}}}}. Instead of counting braces manually: Ctrl + P jumps from the opening { to the closing } Ctrl + Shift + E selects everything in between for copying or extracting! 👇 Have you ever been lost in a sea of closing brackets? How do you keep track of nested code? #RStats #RStudio #ProductivityTips #CodeNavigation #DataScience #Coding #Bioinformatics #RShortcuts #Day15 #Omicscoder #WaqasYousa
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