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
Max Distance Between Two Different Colors LeetCode Challenge
More Relevant Posts
-
Day 39 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Integer to Roman 💻 Language: Python 📚 Key Learnings: • Learned how to map numerical values to symbolic representations • Used greedy approach for optimal conversion • Understood importance of ordered value-symbol pairing • Practiced handling special subtraction cases (IV, IX, XL, etc.) • Improved skills in writing structured and readable logic Consistency + Logic = Growth 🚀 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #Algorithms #CodingJourney #Greedy #120DaysOfCode
To view or add a comment, sign in
-
-
From Code to Combat 💥 Who says programming can't be a little "supercharged"? I spent some time building a real-time gesture recognition tool in Python. By tracking hand coordinates and calculating the velocity of movement, I’ve managed to turn code into energy. It’s one thing to build a backend system, but seeing your logic manifest as a visual blast is a different kind of win. So you got to know an animie fan..hehehe #Python #OpenCV #DragonBallZ #CreativeCoding #MachineLearning #TechDemo
To view or add a comment, sign in
-
🚀 Solved: Find a String (Substring Count) Challenge Just solved another problem on HackerRank under the Python Strings section! ✅ 🧠 Problem Overview: Count how many times a substring appears in a string — including overlapping occurrences. 🔍 Key Learnings: Practiced string traversal techniques Understood why built-in methods like count() may not always work (no overlapping support) Strengthened concepts of slicing and iteration in Python 💡 Example Insight: For string "ABCDCDC" and substring "CDC", the answer is 2 (overlapping counts matter!). ⚡ Approach Used: Iterated through the string Compared substrings using slicing Counted valid matches efficiently 📈 Problems like this help build strong fundamentals in string manipulation, which is crucial for coding interviews and real-world applications. #Python #HackerRank #Coding #Strings #ProblemSolving #DSA #LearningJourney #AI link of #Solution :- https://lnkd.in/gtqcy8fX
To view or add a comment, sign in
-
-
🚀 Day 34 – LeetCode Journey Today’s problem: Isomorphic Strings ✔️ Solved using a concise Python approach with sets ✔️ Compared unique character patterns efficiently ✔️ Achieved clean and optimized code 💡 Key Insight: By comparing the lengths of set(s), set(t), and set(zip(s, t)), we can quickly verify if both strings follow the same mapping pattern — ensuring a one-to-one relationship. Sometimes, the simplest solutions are the most powerful ✨ Continuing to learn, simplify, and grow every day 🔥💪 #LeetCode #Day34 #Python #Strings #Hashing #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
I used to juggle pip, virtualenv, pyenv, poetry, and pipx just to set up a Python project. Then I discovered uv - and I haven't looked back. uv is an extremely fast Python package and project manager (written in Rust ⚡) that replaces all of them with a single tool - 10-100x faster than pip. Whether you're starting a fresh project or migrating an existing one, this carousel walks you through everything - from the old way to the new way, command by command. Swipe through ➡️ #Python #SoftwareEngineering #BackendEngineering #uv #DevTools #AIEngineering #FastAPI
To view or add a comment, sign in
-
Beyond String Concatenation When I started, I used to concatenate strings the old-school way. It was messy, prone to errors, and hard to read The Problem: Using + requires manual type conversion (like str(21)) and gets confusing with all the extra quotes and spaces Solution: F-strings Introduced in Python 3.6, F-strings makes your code: ✅ Readable: You see the full sentence structure ✅ Fast: They are more efficient than older methods ✅ Flexible: You can perform math or call methods directly inside { } It’s a small concept, but it’s one of the easiest ways to make code look 10x more professional. #Python #30DaysOfCode #BCA #LearningInPublic #Day21 #JECRC Day 21/30
To view or add a comment, sign in
-
-
🚀 Day 13/30 – Python Challenge Diving into string operations in Python! 🐍 🔹 Key Concepts Covered: * String methods like upper() and lower() * Finding length using len() * Replacing text using replace() * String slicing 💻 Mini Task: Worked with a string to perform multiple operations like changing case, finding length, replacing words, and extracting specific parts of the text. 🎯 Learning Outcome: Learned how powerful string operations are in Python and how they help in processing and manipulating text efficiently. Understanding text handling step by step 💡 #Python #CodingChallenge #LearningJourney #Strings #StudentDeveloper #Day13
To view or add a comment, sign in
-
-
🚀 Day 6/30 – Python Challenge Exploring loops in Python today! 🐍 🔹 Key Concepts: * for loop using range() * while loop execution * Iteration and repetition in programs 💻 Mini Task: Printed numbers from 1 to 5 using both for loop and while loop to understand their working. 🎯 Learning Outcome: Learned how loops help automate repetitive tasks and make code more efficient. Consistency + practice = improvement 📈 #Python #CodingChallenge #LearningJourney #AI #StudentDeveloper #Day6
To view or add a comment, sign in
-
-
#MachineLearning #Python #AI #DataScience #Pickle After building your AI model, the training phase can take a long time, and you may close VSCode. It is not logical to train the model again every time you run your code. This is where Python’s pickle module becomes invaluable. It allows us to serialize (save) and deserialize (load) Python objects, including our AI model. With model.pickle, we don’t need to train the model again next time — we just load it and use it directly.
To view or add a comment, sign in
-
-
Started moving from learning syntax to actually building logic. 🚀 Project: Number Guessing Game in Python Built an interactive game where the system generates a random number and provides hints (higher/lower) until the correct guess is made. 🔹 Concepts applied: • Random module • While loop for continuous interaction • Conditional logic (if-elif-else) • Attempt tracking 💡 Key learning: Even a simple project highlights the importance of writing correct logic and thinking step by step to improve user interaction. 📌 Focusing on consistency and improving with every project. #Python #CodingJourney #BeginnerProjects #ProblemSolving #100DaysOfCode
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