💻 Implemented Binary Search in C today 🚀 Learned how dividing the search space reduces time complexity from O(n) to O(log n). Focused on clear logic and clean code using left, right, and mid. 📌 Simple logic → Efficient solution #BinarySearch #CProgramming #DSA #CodingJourney Github : https://lnkd.in/gtwwQWed
Implementing Binary Search in C with O(log n) Time Complexity
More Relevant Posts
-
Day 4 🚀 Solved: Task Scheduler (LeetCode 621) This problem is about scheduling tasks with a cooldown period between identical tasks. 💡 Key idea: Always execute the task with the highest remaining frequency, while respecting the cooldown constraint. 🔹 Approach: Use a max heap to pick the most frequent task Use a queue to manage cooldown periods Simulate execution step by step ⏱️ Time Complexity: O(n log k) 🔗 GitHub: https://lnkd.in/gz_47bBz #DSA #LeetCode #Coding
To view or add a comment, sign in
-
One step closer🔥 LeetCode Progress 49/50 — Decode Ways I worked on a fundamental problem focused on dynamic programming and string decoding 🧩 💡 The challenge was to find the number of ways to decode a given digit string into letters (A–Z mapping). 🧠 Approach: Used dynamic programming to track valid decoding ways at each index. Handled edge cases like leading zeros and invalid two-digit combinations carefully. ⏱ Time Complexity: O(n) 💡 What I learned: This problem improved my understanding of DP state building and how to break a problem into smaller subproblems with valid transitions. 📈 Strengthening dynamic programming fundamentals and logical thinking for complex string problems. #LeetCode #DSA #DynamicProgramming #Strings #ProblemSolving #Cpp #CodingJourney #Consistency 🚀
To view or add a comment, sign in
-
-
Why Code Breaks in Production In this blog, we’ll explore the most common reasons production bugs occur and how to prevent them with better practices. Think of it as a developer’s survival guide for real-world deployments.... Read more → https://lnkd.in/djRBmG-f #TheCampusCoders #Tech #Developers #Programming #WebDev
To view or add a comment, sign in
-
I’m tired of forgetting terminal commands for specific projects. You switch to a repo you haven't touched in a month and immediately think, "Wait, what was the flag for that specific migration again?" or "How do I start this legacy project?" I got fed up with digging through my shell history and rereading the READMEs. So I built QuickRun to keep everything where it belongs: Right inside the project. ⚡ How it works for teams: 📂 Centralized Access: Save commands to a .vscode/quickrun.json file in your repo. 🤝 Shared Knowledge: When you add a new command, just commit it. Now the whole team has it instantly. 🚀 Easy Access: Everyone runs the exact same scripts from a simple sidebar panel. No more searching through READMEs or shell histories. It’s free, open-source, and turns your README into actual, clickable buttons. 🛠️ 🔗 Check it out here: VS Code Marketplace: https://lnkd.in/eaYAn_jj GitHub: https://lnkd.in/eTye2zyA #vscode #developer #productivity #buildinpublic #opensource #coding
To view or add a comment, sign in
-
Unpopular opinion: Documentation and source code are better teachers than 10-hour tutorial videos. I’ve recently been spending more time diving into open-source repositories like this one, and the clarity you get from seeing how senior engineers structure real-world logic is unmatched. Don't get me wrong, videos are great for getting started. But if you want to understand: How complex types are actually handled How to structure a library for scale The "why" behind design patterns ...nothing beats opening the lib folder and reading the implementation yourself. What’s one repo that taught you more than a course ever did? 👇 #SoftwareEngineering #OpenSource #WebDevelopment #CleanCode #LearningToCode #100daysofcode
To view or add a comment, sign in
-
-
🤖 tuicr — GitHub-style code review TUI for diffs 💯 Comment, review, and export structured feedback for agents 🦀 Written in Rust & built with Ratatui ⭐ GitHub: https://lnkd.in/dBzH8VMR #rustlang #ratatui #tui #git #codereview #devtools #productivity #programming #terminal
To view or add a comment, sign in
-
Writing code: 30% Debugging code: 70% 😄 I used to think good developers write perfect code… Now I know — 👉 Good developers know how to debug fast. Breakpoints, logs, trial & error… That’s where real learning happens. Still improving every day 💻 What’s your go-to debugging trick? 👇 #Programming #Debugging #DevLife #SoftwareEngineering
To view or add a comment, sign in
-
-
💡Did you know? C provides predefined macros to display when your program was compiled ⏱️ 🔹 __DATE__ → shows compile date 🔹 __TIME__ → shows compile time 📌 Useful for debugging and tracking build versions. #CProgramming #CodingTips
To view or add a comment, sign in
-
-
Day 81 on LeetCode Remove Linked List Elements 🔗🧹✅ Still prioritizing consistency during busy days — and today’s problem was a solid linked list traversal & deletion practice 💯 🔹 Approach Used in My Solution The goal was to remove all nodes with a given value from a linked list. Key idea: • First, handle edge cases where head itself contains the target value • Move head forward until it points to a valid node • Then traverse the list using two pointers: – prev → last valid node – temp → current node • If temp->val == val → skip the node by linking prev->next • Otherwise → move both pointers forward This ensures all matching nodes are removed efficiently. ⚡ Complexity: • Time Complexity: O(n) • Space Complexity: O(1) 💡 Key Takeaways: • Practiced pointer manipulation in linked lists • Learned how to safely handle deletions, especially at head • Reinforced importance of edge case handling 🔥 Small consistent steps → strong fundamentals. #LeetCode #DSA #Algorithms #DataStructures #LinkedList #Pointers #ProblemSolving #Coding #Programming #Cpp #STL #SoftwareEngineering #ComputerScience #CodingPractice #DeveloperLife #TechJourney #CodingDaily #Consistency #100DaysOfCode #BuildInPublic #AlgorithmPractice #CodingSkills #Developers #TechCommunity #SoftwareDeveloper #EngineeringJourney
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