Day 4 of #100DaysOfCode 💻🔥 Today I worked on a challenging problem: “Median of Two Sorted Arrays”. This problem pushed me to think beyond brute force and understand how to apply binary search in an optimized way. Key takeaways: Learned how to use binary search on the smaller array Understood partitioning technique for two sorted arrays Achieved optimal time complexity of O(log(min(m, n))) Problems like these really improve problem-solving skills and deepen understanding of algorithms 🚀 #coding #leetcode #100DaysOfCode #algorithms #programming #developers Day 4 of #100DaysOfCode 💻🔥 Today I worked on a challenging problem: “Median of Two Sorted Arrays”. This problem pushed me to think beyond brute force and understand how to apply binary search in an optimized way. Key takeaways: Learned how to use binary search on the smaller array Understood partitioning technique for two sorted arrays Achieved optimal time complexity of O(log(min(m, n))) Problems like these really improve problem-solving skills and deepen understanding of algorithms 🚀 #coding #leetcode #100DaysOfCode #algorithms #programming #developers
Median of Two Sorted Arrays Binary Search Optimization
More Relevant Posts
-
Recursion & Stack Overflow Explained Simply! Understanding these two concepts can level up your problem-solving skills in programming 💻 🔁 Recursion is when a function calls itself to solve smaller parts of a problem. It’s powerful and widely used in algorithms like trees, graphs, and backtracking. ⚠️ But here’s the catch… If recursion is not handled properly (missing a base case), it can lead to a Stack Overflow where too many function calls fill up memory and crash your program 💥 💡 Key Takeaways: ✔ Always define a base case ✔ Ensure your recursion moves toward it ✔ Avoid unnecessary deep recursion ✔ Be mindful of memory usage 🔥 Why it matters? Mastering recursion helps you think logically and write cleaner, more efficient code but only if you use it wisely! 💬 Have you ever faced a stack overflow error? What was the cause? #Programming #Flutter #Dart #Coding #SoftwareDevelopment #Recursion #StackOverflow #Developers #LearnToCode
To view or add a comment, sign in
-
-
10 Must Know Array Patterns Follow Algonur For more details visit: https://www.algonur.com/ Save this for your next coding session 👇 #DataStructures #Algorithms #CodingInterview #Programming #SoftwareEngineering #LeetCode #ProblemSolving #TechSkills #Developers #CodingTips
To view or add a comment, sign in
-
Yesterday: Decisions (if-else) Today: Repetition (loops) Real apps don’t just decide once—they repeat actions. 👉 Example: You have 100 users You don’t write 100 lines of code You use a loop: for user in users: process(user) Another example: Sending notifications to all users → loop runs for each user What beginners do: ❌ Use loops only for “print 1 to 10” ❌ Don’t understand what changes each step What actually matters: ✅ What is repeating? ✅ What is changing? If you don’t understand loops, you can’t handle real data. Tomorrow: Functions (how real code is structured) 🔥 #coding #python #loops #learncoding #programming #developers #beginners #softwaredevelopment #tech
To view or add a comment, sign in
-
-
This post shares real data for awareness, Markets change, but opportunities continue to grow. Stay prepared and keep moving forward. #informationtechnology #pythonprogramming #coding #pythonprogramming #softwaredeveloper
To view or add a comment, sign in
-
Your code is not slow because of the language. It’s slow because of decisions. Most common mistakes: • unnecessary loops • repeated API calls • poor database queries Switching tech won’t fix this. Thinking better will. Performance is not magic. It’s design. Have you faced this? #softwaredevelopment #programming #developers #coding #techtips
To view or add a comment, sign in
-
-
Even though we write code every day, we often view the compiler as a "black box." Today, let's explore how a compiler actually works, discuss its lifecycle, and see where trees come into play. https://lnkd.in/eFHN5KC6 #compiler #coding #SoftwareEngineering #TechExplained #Cpp #CompilerDesign
To view or add a comment, sign in
-
Most people try to learn languages. Smart developers learn the patterns behind them. Every programming language may look different, but the fundamentals stay the same Logic → Variables → Conditions → Loops → Functions → Data Structures Once you understand these core building blocks, switching from one language to another becomes easy. Don’t chase syntax. Master the concepts that’s where real growth happens. #programming #codingbasics #learncoding #developers #softwareengineering
To view or add a comment, sign in
-
So far: • If-else → decisions • Loops → repetition Now: Functions → structure 👉 Problem: Beginners write the same code again and again Example: Send notification Send email Send alert They copy-paste logic everywhere ❌ 👉 Solution: Use a function def send_notification(user): # logic Now just call it whenever needed ✅ 👉 Real use: - User signup → send welcome - Purchase → send confirmation - Reset password → send email Same logic. Different use. Big mistake: ❌ Writing messy repeated code ✅ Breaking code into reusable blocks If you don’t use functions, your code won’t scale. Tomorrow: Data (lists/dictionaries — real power) 🔥 #coding #python #functions #learncoding #programming #developers #softwaredevelopment #beginners #tech
To view or add a comment, sign in
-
-
You want to crack tech interviews or build scalable systems, These 10 Data Structures are non-negotiable. #DataStructures #DSA #Programming #Coding #SoftwareEngineering #TechLearning #ComputerScience #Developers #CodingLife #LearnToCode
To view or add a comment, sign in
-
-
I used to get confused between Patterns and Algorithms. As a beginner, everything felt the same to me. But recently, something became clear… They are not the same. Patterns are how you think. Algorithms are how you optimize. And that changed how I approach problems. Now instead of trying to learn everything at once, I’m focusing on patterns first. Like: using a map to count things using two pointers using sliding window Because once I understand the pattern, I can solve many problems with it. Algorithms can come later as upgrades. Trying to learn both together was just making me confused. So my current approach is simple: Learn patterns → practice → then optimize. #DSA #Algorithms #DataStructures #CodingJourney #LeetCode #ProblemSolving #Programming #LearnInPublic #Developers #CodeNewbie #GrowthMindset
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