Max Distance Between Two Different Colors LeetCode Challenge

Day 45 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Maximum Distance Between Two Different Colors 💻 Language: Python 📚 Key Learnings: • Applied greedy observation-based approach • Learned to compare elements with first and last values • Avoided unnecessary nested loops → kept solution O(n) • Improved thinking in terms of distance maximization • Reinforced writing simple and efficient code Not every problem needs complexity — smart thinking matters 💯 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #Greedy #Algorithms #CodingJourney #120DaysOfCode

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories