Day 55 of #Python108DaysChallenge 🐍 Learned the Floyd–Warshall Algorithm for computing all-pairs shortest paths using dynamic programming. Key insights: ✔ Works on dense weighted graphs ✔ Handles negative weights (no negative cycles) ✔ Complexity O(V³) ✔ Useful for routing tables and path analysis Another powerful addition to the graph algorithms toolkit! #Python #DSA #Graphs #FloydWarshall #DynamicProgramming #LearningInPublic #CodingJourney
Floyd–Warshall Algorithm for All-Pairs Shortest Paths
More Relevant Posts
-
As part of the Data Structures and Algorithms course, we worked on an introductory "Weather" task that involved designing a "Weather" class and implementing various methods. This exercise served as my first formal exposure to Object-Oriented Programming (OOP) in Python. In addition, we developed and executed basic programs to demonstrate the four core principles of OOP: encapsulation, inheritance, polymorphism, and abstraction. This lab task provided valuable hands-on experience in structuring code using object-oriented design and significantly enhanced my understanding of how theoretical concepts are applied in practical programming scenarios. #DSA #ObjectOrientedProgramming #PythonProgramming #DataStructures #Algorithms
To view or add a comment, sign in
-
LeetCode Problem 64: "Minimum Path Sum": Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. This problem clearly checks your understanding of dynamic programming. The below implementation in Python clearly and efficiently resolves this task in Time Complexity of O(m*n) and with constant space. The solution below modifies existing grid in-place, simply and clearly. #DSA #LeetCode #Python #Matrix #ComprtitiveProgramming #Algorithms #DataStructures #InterviewPrep #OptimalSolution #Programming
To view or add a comment, sign in
-
-
🚀 𝟲𝟬 𝗗𝗮𝘆𝘀 𝗼𝗳 𝗖𝗼𝗱𝗶𝗻𝗴 | 𝗗𝗦𝗔 𝘅 𝗥𝗲𝗮𝗹 𝗪𝗼𝗿𝗹𝗱 𝗣𝗿𝗼𝗷𝗲𝗰𝘁𝘀 #Day50 | 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗔𝗻𝗮𝗹𝘆𝘇𝗲𝗿 𝗗𝗮𝘀𝗵𝗯𝗼𝗮𝗿𝗱 Built a Performance Analyzer Dashboard to compare Memoization vs Tabulation in Dynamic Programming using real execution-time measurements. Focused on: • Top-Down vs Bottom-Up DP • Time and space trade-offs • Performance comparison • Understanding when to choose the right DP strategy 📌 Code and documentation: https://lnkd.in/gxzGJ4nB Feedback and suggestions are welcome. #DSA #DynamicProgramming #Memoization #Tabulation #Python #60DaysOfCoding #LearningInPublic #SoftwareEngineering
To view or add a comment, sign in
-
One underrated feature of NumPy: vectorization 🚀 One of NumPy’s most powerful features is vectorization—the ability to perform operations on entire arrays without writing explicit loops. This leads to cleaner code and significant performance gains. Example: Suppose you want to compute compound growth for 5 years at 8% . here is the python code---- import numpy as np years = np.arange(1, 6) growth = (1.08) ** years print(growth) [1.08 1.1664 1.259712 1.36048896 1.46932808] With a single expression, NumPy applies the operation across all elements efficiently—no for loop needed. Under the hood, this leverages optimized C code, making NumPy both expressive and fast. If you work with data, simulations, or numerical modeling, mastering vectorization is a game changer. #NumPy #Python #DataScience #ScientificComputing #Programming
To view or add a comment, sign in
-
Stack is a linear data structure that follows the LIFO principle (Last In, First Out). Elements are added and removed only from the top of the stack. Stacks are widely used in function calls, undo/redo operations, and backtracking. They play a key role in expression evaluation and syntax checking. Understanding stacks builds a strong foundation for advanced DSA concepts . #python #programming #DSA #SoftwareEngineering
To view or add a comment, sign in
-
-
I recently revisited a teaching example and realized how well it highlights a workflow I strongly believe in: combining #Simba with Python notebooks for control design. Analytical tuning, visualization, and high-fidelity switching simulations all live in the same loop — fast, transparent, and highly reusable. Full example here: https://lnkd.in/euUDGmEw
To view or add a comment, sign in
-
Problem: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. ⚠️ Constraint: The solution must run in O(n) time. Example: Input: [100, 4, 200, 1, 3, 2] Output: 4 → Sequence: [1, 2, 3, 4] 💡 Key insight: Using a HashSet and only starting a count when a number has no predecessor (num - 1 not present). This avoids redundant work and keeps the solution linear. 👇 I’d love to learn from the community: Drop your solution below in your preferred programming language Share how you explain this approach Any edge cases or twists you’ve encountered? Let’s learn together 🚀 #LeetCode #DSA #Algorithms #Python #Coding
To view or add a comment, sign in
-
-
🚀 Day-48 of #100DaysOfCode 🐍 Python Pattern Programming – Continuous Alphabet Triangle Today I implemented an Alphabet Triangle Pattern where characters print continuously using ASCII values. 🔹 Concepts Practiced: ✔ Nested loops ✔ ASCII value manipulation ✔ chr() function ✔ Sequential character logic ✔ Pattern visualization 🔹 Approach: Initialize ASCII value to 65 Convert ASCII to character using chr() Increment the value after each print Continue sequence across rows 🔹 Key Learning: This exercise improved my understanding of character encoding, loop control, and pattern logic building, which are important for strengthening programming fundamentals. #Python #PatternProgramming #AlphabetPattern #CorePython #100DaysOfCode #Day48 #LearnPython #CodingPractice #PythonDeveloper
To view or add a comment, sign in
-
-
Tuples are one of those Python concepts everyone learns early — but many don’t fully use them. They are: • ordered • immutable • fast and memory-efficient You’ll often see tuples used for: - function returns - coordinates (x, y) - configuration values - data that should not change When you understand what tuples are and when to use them, your code becomes safer and more intentional. This infographic covers the essentials you’ll revisit again and again. Save it for a quick refresh later. #Python #LearnPython #PythonBasics #Programming #Coding #SoftwareEngineering #PythonDevelopers
To view or add a comment, sign in
-
-
𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗟𝗘𝗔𝗥𝗡𝗜𝗡𝗚 𝗙𝗢𝗥 𝗕𝗘𝗚𝗜𝗡𝗡𝗘𝗥𝗦 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 & 𝗦𝗰𝗼𝗽𝗲 𝗶𝗻 𝗣𝘆𝘁𝗵𝗼𝗻 As Python programs grow, writing code line by line simply isn’t enough. Real-world programming is about structure, reusability, and control — and that’s exactly where functions and scope come in. In this notebook, I explore: - How functions break complex logic into manageable pieces - Parameters, return values, and default arguments - Variable-length arguments (*args, **kwargs) - The LEGB rule & variable resolution - Local vs Global vs Enclosing scope #Python #Programming #SoftwareDevelopment #DataScience #MachineLearning #Coding #LearnToCode #TechSkills
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