Srikanth Doddi’s Post

View profile for Srikanth Doddi

Architect @ OSI | Public Speaker | Speaker @ PyCon 2025 | Certified Coach | 7X Cloud Certified

Day 5 of #30DaysOfCode Solving "Loud and Rich" - A Graph Theory Challenge Just tackled an interesting problem that combines graph traversal with dynamic programming! The Problem: Given people with different wealth levels and quietness scores, find the quietest person among those who are equally or more wealthy than each individual. Key Insights: ✓ Model wealth relationships as a directed graph ✓ Use DFS/BFS with memoization to traverse richer individuals ✓ Track the quietest person at each level The Approach: 1. Build an adjacency list where edges point from richer to poorer individuals 2. For each person, traverse all people who are richer (or equal) 3. Use memoization to avoid redundant calculations 4. Return the person with minimum quiet value in each subtree Time Complexity: O(n + e) where e is the number of wealth relationships Space Complexity: O(n) for the memoization cache This problem beautifully demonstrates how graph algorithms can model real-world hierarchical relationships! What's your favorite approach to solving graph traversal problems with optimization constraints? #DSA #GraphTheory #ProblemSolving #SoftwareEngineering #Algorithms #TechChallenges #30DaysOfCode #educative Educative

Nicely done! Clear, structured, and insightful — keep it up 💪

Like
Reply

To view or add a comment, sign in

Explore content categories