Day 37 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Search a 2D Matrix 💻 Language: Python 📚 Key Learnings: • Applied Binary Search on a 2D matrix • Learned how to treat matrix as a flattened sorted array • Practiced converting 1D index → 2D index (row, col) • Improved understanding of search space reduction • Strengthened logarithmic time complexity (O(log n)) thinking Better logic → Faster execution 🚀 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #BinarySearch #Algorithms #CodingJourney #Consistency #120DaysOfCode
Solved LeetCode Search a 2D Matrix with Python
More Relevant Posts
-
Day 34 / #120DaysOfCode – LeetCode Challenge ✅ Problem Solved: • Longest Harmonious Subsequence (LHS) 💻 Language: Python 📚 Key Learnings: • Used HashMap (Counter) to store frequency efficiently • Learned how to identify harmonious pairs (num & num + 1) • Improved understanding of frequency-based problems • Practiced optimizing solution using O(n) approach • Strengthened problem-solving using pattern recognition Small consistency → Big improvement 📈 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #HashMap #CodingJourney #Consistency #120DaysOfCode
To view or add a comment, sign in
-
-
Day 28 / #120DaysOfCode – LeetCode Challenge 🚀 Consistency is building momentum 💯 Today’s focus was on String Processing and Frequency Counting, using Python’s built-in tools for efficient solutions. ✅ Problem Solved: • Most Common Word 💻 Language: Python 📚 Key Learnings: • Used regex (re.findall) to extract words cleanly • Applied Counter to count word frequency efficiently • Learned how to handle case-insensitive strings • Filtered out unwanted words using conditions Clean code + built-in functions = powerful solutions 🚀 Every day improving step by step 💪 🔗 LeetCode Profile: https://lnkd.in/gbeMKcv5 #LeetCode #Python #DSA #Strings #Regex #ProblemSolving #CodingJourney #Consistency #120DaysOfCode
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
-
-
Python Series — Day 3 🧠 Let’s level it up a bit 👇 What will be the output of this code? def modify_list(lst): lst.append(4) a = [1, 2, 3] modify_list(a) print(a) Options: A. [1, 2, 3] B. [1, 2, 3, 4] C. Error D. None Think carefully 👀 (Hint: It’s not about functions… it’s about how Python handles data) Drop your answer 👇 Answer tomorrow 🚀 #Python #CodingChallenge #LearningInPublic #DataEngineering #Tech
To view or add a comment, sign in
-
-
Python Clarity Series – Episode 25 Topic: Mutable vs Immutable Function Behavior 📌 Why did my list change after function call? def modify(lst): lst.append(100) a = [1, 2] modify(a) print(a) Output: [1, 2, 100] 👉 Lists are mutable → changes reflect outside Now: def modify(x): x = x + 10 a = 5 modify(a) print(a) Output: 5 👉 Integers are immutable → no change outside 💡 Rule: Mutable → changes persist Immutable → changes don’t This confusion causes logic errors. #PythonBasics #FunctionConcepts #StudentClarity #python #clarity
To view or add a comment, sign in
-
-
Day 60/100 — #100DaysOfCodingChallenge 60 days in… consistency is slowly turning into a habit now. 🔹 Python (DSA) Solved Search a 2D Matrix — used binary search by treating the matrix like a flattened sorted array. It was a nice reminder of how powerful binary search can be when applied smartly. 🔹 SQL Did some light practice to keep concepts fresh and maintain the streak. #Python #SQL #DSA #LeetCode #Day60 #100DaysOfCode #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
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
-
-
🐍 Day 117 — Hyperparameter Tuning Day 117 of #python365ai ⚙️ Tune model settings to improve performance. Example: from sklearn.model_selection import GridSearchCV 📌 Why this matters: Small changes can significantly improve results. 📘 Practice task: Tune one parameter in a model. #python365ai #HyperparameterTuning #ML #Python
To view or add a comment, sign in
-
-
Day 7 - Hash Table Deep Dive The answer is O(1) AMORTIZED - and the 'amortized' part is what trips people up. In the best case, hash lookups are O(1). But with hash collisions, worst case is O(n). The key insight: with a good hash function and load factor below 0.75, the AVERAGE case stays O(1). Python dicts use open addressing with random probing, keeping collisions rare. This is why interviewers ask 'average' vs 'worst case' - they want to see if you understand the nuance. Drop your answer! Heart for correct ones. Follow DatascienceBro for Week 2! #datastructures #hashtable #timecomplexity #python #codinginterview #algorithms #bigO #programming #techinterview #softwareengineering
To view or add a comment, sign in
-
-
🔁 Exploring Sorting Algorithms in Python Today I practiced two fundamental sorting techniques: ✅ Bubble Sort ✅ Selection Sort 💡 Key Learnings: * Bubble Sort repeatedly swaps adjacent elements to push larger elements to the end * Selection Sort selects the minimum element and places it in the correct position * Understanding time complexity becomes clearer when you count operations manually #Python #DataStructures #Algorithms #CodingJourney #100DaysOfCode #LearningInPublic
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