I recently worked on a project focused on optimizing pathfinding algorithms — and it gave me a deeper appreciation for how efficient systems are built. 🚀 Project: Pathfinding Algorithm Optimization 🔧 What I did: • Built a route optimization tool using Dijkstra’s and A* algorithms • Modeled real-world road networks using geospatial data • Used Python with OSMnx and NetworkX to simulate city navigation 📊 Results: Improved traversal efficiency by ~65% by applying heuristic-based optimizations. 📍 What I learned: • How algorithms behave in real-world scenarios (not just theory) • The impact of heuristics on performance • How to visualize complex data to make it understandable One thing that stood out — small optimizations can lead to significant performance gains when working with large-scale systems. Still exploring and improving my understanding of algorithms and backend systems. Would love to hear your thoughts or feedback! #SoftwareEngineering #Python #Algorithms #DataStructures #LearningInPublic #TechProjects
Optimizing Pathfinding Algorithms with Dijkstra's and A*
More Relevant Posts
-
✅ Day 83 of 100 Days LeetCode Challenge Problem: 🔹 #832 – Flipping an Image 🔗 https://lnkd.in/ghfEcHHT Learning Journey: 🔹 Today’s problem involved two operations on a binary matrix: horizontal flip and bit inversion. 🔹 First, I reversed each row to achieve the horizontal flip. 🔹 Then, I inverted every bit (0 → 1 and 1 → 0) using a helper function. 🔹 This approach ensured the transformation was done in-place without extra space. Concepts Used: 🔹 Array Manipulation 🔹 Matrix Traversal 🔹 Two-Pointer / In-place Operations 🔹 Bit Manipulation Key Insight: 🔹 Instead of treating flipping and inversion as separate heavy operations, they can be efficiently combined or done sequentially in-place. 🔹 Using simple transformations keeps the solution clean and optimal. Complexity: 🔹 Time: O(n × m) 🔹 Space: O(1) #LeetCode #Algorithms #DataStructures #CodingInterview #100DaysOfCode #SoftwareEngineering #Python #ProblemSolving #LearningInPublic #TechCareers
To view or add a comment, sign in
-
-
Live Demo : https://lnkd.in/gzBZ5d2V I developed this project purely for learning purposes, and it turned out to be one of the most hands-on experiences I've had with computer vision so far. What it does: → Edge Detection — Canny, Sobel & Laplacian → Filters — Greyscale, Warm tone, Sharpen → Portrait Blur with bokeh simulation → Brightness & Contrast scaling → Smart Resize with adaptive interpolation → Rotation & live preview panel Tech stack: Python · OpenCV · Streamlit · NumPy · Pillow What I actually learned building this: GitHub : https://lnkd.in/gNZHS8YC Drop a ⭐ on the repo if it helps you! ✦ How classic edge detection algorithms work mathematically not just calling cv2.Canny() blindly ✦ Managing Streamlit session state to track UI interactions efficiently ✦ The difference between INTER_AREA (downscale) and INTER_CUBIC (upscale) interpolation ✦ Simulating camera bokeh using elliptical Gaussian masking ✦ Injecting JavaScript into Streamlit to build sticky panels and custom scrollbars This project reminded me that the best way to understand an algorithm is to build something real with it. All code is open source built for the community to learn from. Innomatics Research Labs #Python #OpenCV #ComputerVision #Streamlit #ImageProcessing #BuildInPublic #OpenSource #MachineLearning #SoftwareDevelopment #100DaysOfCode #HuggingFace #LearnInPublic
To view or add a comment, sign in
-
import random import numpy as np while 1: print(random.choice(['left','right','straight','back']) a=input() #Next we have to update a matrix based on conditionals on input a #Simplest maze solver if we solve in Python for humans it can be modified for phone or anything with artificial intelligence code transform Floodfillmatrix=np.zeros(100,100) if(a=='rightarrow'): print('I don't know how to code flood fill')
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
-
-
💡 Cracking the Maximum Product Subarray Problem (Without Overcomplicating It) Today I worked on a classic DSA problem: Maximum Product Subarray — and found a simple yet powerful approach worth sharing. Most solutions focus on tracking max/min dynamically. But there’s a cleaner trick: 👉 Traverse the array from both directions (prefix & suffix) Why this works: Negative numbers can flip the product sign A single left-to-right pass might miss the optimal answer Scanning from both ends ensures we capture every possibility 🔁 Key Idea: Maintain two running products: Prefix (left → right) Suffix (right → left) Reset when product becomes 0 Track the maximum throughout ⚡ Complexity: Time: O(n) Space: O(1) Python code : https://lnkd.in/gZtCw9_i What I liked about this approach is its simplicity and elegance — no extra arrays, no complex state tracking. Sometimes, the best solutions aren’t the most complicated ones — just the most thoughtful. Have you tried solving this problem using a different approach? Would love to hear your thoughts 👇 #DataStructures #Algorithms #CodingInterview #Python #LeetCode #ProblemSolving Rajan Arora
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
-
-
Weekly Challenge 9: TSP With Farthest Insertion. How do you find the shortest route to visit multiple locations without wasting fuel or time. This is known as the Traveling Salesperson Problem (TSP), one of the most famous challenges in computer science and Operations Research. Since finding the "perfect" route by checking every combination takes too long, we use Heuristics to find highly optimized routes in milliseconds. For Week 9 of my Python challenge, I built a spatial heuristic from scratch: > 1️⃣ Generated random nodes (cities) on a 2D plane. > 2️⃣ Calculated their Euclidean distance from the origin. > 3️⃣ Programmed an **Insertion Sort** algorithm to sort the nodes by distance. > 4️⃣ Compared the random route vs. the optimized route. > 📉 The Result: As you can see in the graph below, just by applying this sorting logic, the route distance is drastically reduced (saving over 30% in travel distance in most random scenarios!). Data visualization makes optimization beautiful. Full source code on my GitHub: https://lnkd.in/epZBxUnQ #Python #Optimization #OperationsResearch #DataScience #Matplotlib #Algorithms #CodingChallenge
To view or add a comment, sign in
-
🚀 Day 45 of My Learning Journey – NumPy Shape & Reshape Today, I explored how to work with array dimensions using NumPy, focusing on shape and reshape. 🔹 Key Learnings: ✔️ shape Helps to identify the dimensions of an array Example: (3, 2) → 3 rows and 2 columns ✔️ Modifying shape We can directly change the structure of an array Useful when reorganizing data ✔️ reshape() Creates a new array with a different shape Does NOT modify the original array Very helpful in data preprocessing 🔹 Hands-on Task Completed: Converted a list of 9 elements into a 3×3 matrix using NumPy. 💡 Takeaway: Understanding how to manipulate array dimensions is essential for data analysis, machine learning, and efficient problem-solving. 📌 Every small concept builds a stronger foundation! #Day45 #Python #NumPy #LearningJourney #DataScience #Coding #StudentLife
To view or add a comment, sign in
-
-
🚀 Stop iterating through rows like it’s 2010. In a recent pipeline, we were processing 5 million records to calculate a rolling score. Using a standard loop took forever and pegged the CPU at 100%. Before optimisation: for i in range(len(df)): df.at[i, 'score'] = df.at[i, 'val'] * 1.05 if df.at[i, 'flag'] else df.at[i, 'val'] After optimisation: import numpy as np df['score'] = np.where(df['flag'], df['val'] * 1.05, df['val']) Performance gain: 85x faster execution. Vectorisation isn’t just a "nice to have"—it’s the difference between a pipeline that crashes at 2 AM and one that finishes in seconds. By letting NumPy handle the heavy lifting in C, we eliminated the Python overhead entirely. If you're still using `.iterrows()` or manual loops for column transformations, it’s time to refactor. The performance delta on large datasets is simply too massive to ignore. What is the biggest "bottleneck" function you’ve refactored recently that gave you a massive speedup? #DataEngineering #Python #PerformanceTuning #Vectorization #DataScience
To view or add a comment, sign in
-
Day 22/100 – DSA Journey Problem: Find Mode in Binary Search Tree (BST) Today’s problem focused on understanding how Binary Search Trees (BST) behave and how we can efficiently extract useful insights from them. Understanding the BST A Binary Search Tree follows a structured property: Left subtree → values ≤ root Right subtree → values ≥ root Because of this, when we perform an Inorder Traversal (Left → Root → Right), the values are visited in sorted order. Why Inorder Traversal? Since duplicates appear consecutively in a sorted sequence, inorder traversal allows us to: Track frequency without using extra space Compare current value with previous value Efficiently determine the most frequent element (mode) Approach Used Traverse the BST using inorder traversal Maintain: Previous value Current count Maximum frequency Update result list whenever a new maximum frequency is found Key Learning This problem highlights how leveraging tree properties can help optimize solutions. Instead of using extra space (like hashmaps), we used traversal behavior to achieve an efficient solution. Conclusion Understanding the underlying structure of data (like BST properties) is often more powerful than brute-force approaches. Smart traversal choices can significantly reduce space complexity and improve performance. #Day22 #100DaysOfCode #DSA #BinarySearchTree #Python #CodingJourney #LeetCode #ProblemSolving
To view or add a comment, sign in
-
Explore related topics
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