🚀 Day 28 / 128 – Coding Challenge Progress Today I worked on the classic "Square Root (x)" problem from LeetCode. 🔍 Problem Summary: Given a non-negative integer x, compute and return its square root rounded down to the nearest integer — without using built-in exponent functions. 💡 Approach I Used: I implemented a Binary Search solution to efficiently find the integer square root. Instead of checking every number, I narrowed down the answer by: Picking a middle value Comparing mid * mid with x Adjusting the search range accordingly ⚡ Why Binary Search? It reduces time complexity from O(n) to O(log n) — making the solution much faster and scalable. 🧠 Key Learning: This problem reinforced how powerful binary search is, even beyond sorted arrays — especially for mathematical computations. 📌 Progress: Day 28 complete, staying consistent and learning something new every day! #128DaysOfCode #CodingChallenge #LeetCode #JavaScript #ProblemSolving #BinarySearch #DeveloperJourney
LeetCode Square Root Challenge with Binary Search
More Relevant Posts
-
⚙️ Spent 3 hours fixing asset names in UE5 today. Never again. Inherited a messy UE project? Forgotten to prefix assets as you go? 💡The Solution: I built a Python tool that handles the entire renaming process in one click. 🎯 What makes it different: • Rules live in a Data Table (not hardcoded): anyone on the team can update prefixes without touching code • Two-pass collision check: no silent overwrites or mid-rename crashes • Dry run mode: preview every change before committing • Skip folders, cancel safely anytime Built for solo devs, students, technical artists, and pipeline TDs who want BP_, SM_, T_ conventions enforced automatically. 🎨 Preview the tool and get the details here: https://lnkd.in/edyCPz3J #UnrealEngine5 #GameDevelopment #PythonScripting #TechnicalArt #GameTools
To view or add a comment, sign in
-
#ClaudeCode has been leaked yesterday. The engineer who noticed the leak is rewriting the codebase in Python & Rust to avoid takedown. It's the fastest growing repo in history, 𝟴𝟭𝗸 𝘀𝘁𝗮𝗿𝘀 now 28 hours since the leak. There's a good reason for that - Claude Code has been the best in class solution for a long time. There are some interesting unreleased features. Among them daemon mode (background OS process) and heartbeat - suggesting moving the product in the direction paved by OpenClaw. I don't find the new features groundbreaking - if you were following Claude Code development closely this all makes sense. ▪️▪️ 𝗦𝗼 𝘄𝗵𝗲𝗿𝗲 𝗶𝘀 𝗖𝗹𝗮𝘂𝗱𝗲'𝘀 𝗰𝗼𝗺𝗽𝗲𝘁𝗶𝘁𝗶𝘃𝗲 𝗲𝗱𝗴𝗲? Why is it best in class if competitors are already using Opus 4.6? Good engineering and feature-richness 🌀 184 tools and 207 slash commands 🌀 29 subsystems (564 utils, 389 modules, 130 services) 🌀 104 hooks for deep lifecycle integration 🌀 Sophisticated codebase navigation & memory system 〰️〰️ 𝗦𝘆𝘀𝘁𝗲𝗺 𝗽𝗿𝗼𝗺𝗽𝘁 𝗮𝘀𝘀𝗲𝗺𝗯𝗹𝘆 The key to building agents is context engineering. Not too little, not too much - just right. Claude Code has concise core system prompt, but allows the user to dynamically assemble context based on the task and project. System prompts were leaked in October last year, but at that time Claude Code was way less mature. 〰️〰️ 𝗔𝗴𝗲𝗻𝘁 𝘀𝘂𝗯𝘀𝘆𝘀𝘁𝗲𝗺 The agent architecture is built on 20 dedicated modules. Sub-agents aren't just prompts; they are first-class tools spawned as isolated OS threads with restricted permissions. With 6 built-in types (Explore, Plan, Verification, etc.), the parent process never blocks—communication happens via filesystem manifests. It includes persistent memory, task resumption, and "Team tools" for coordinated multi-agent orchestration. 〰️〰️ 𝗕𝗿𝗶𝗱𝗴𝗲 𝘀𝘂𝗯𝘀𝘆𝘀𝘁𝗲𝗺 This is the infrastructure behind the "𝗞𝗔𝗜𝗥𝗢𝗦" daemon mode. Comprising 31 modules, it transforms Claude Code from a local CLI into a remotely-controllable daemon via JWT auth and WebSocket transports. Claude Code is evolving into a persistent cloud agent you can interact with via Telegram, Discord, or Slack. ▪️▪️ 𝗦𝗵𝗼𝘂𝗹𝗱 𝘆𝗼𝘂 𝗮𝗻𝗮𝗹𝘆𝘇𝗲 𝘁𝗵𝗲 𝗰𝗼𝗱𝗲𝗯𝗮𝘀𝗲? Unless you're building similar tools, probably not. But you will benefit from this leak, because builders all over the world will incorporate these ideas into the systems you'll be using. Until then probably the most cost-efficient approach is to just follow Claude's new features. Extremely powerful ones are already here. Claude Code is a sophisticated, powerful tool - but it does have a learning curve. Coding agents are the largest force multiplier since the invention of the Second Monitor. The future is now. Don't miss it.
To view or add a comment, sign in
-
-
🚀 Day 24 of My Coding Journey — Power of Two Today’s problem was “Power of Two” — a simple-looking question that really highlights the beauty of bit manipulation. 🔍 What I learned: Instead of using loops or recursion, I explored how binary representation works. A power of two always has only one set bit (1) in its binary form — and that insight leads to a super efficient solution. 💡 Key trick: n & (n - 1) === 0 This removes the lowest set bit, and if the result is zero, the number is a power of two. ⚡ Takeaway: Sometimes the most optimized solutions come from understanding how data is represented internally, not just from writing more code. 📈 Progress: Day by day, I'm getting more comfortable with problem-solving patterns and thinking beyond brute force approaches. #128DaysOfCode #LeetCode #JavaScript #CodingJourney #ProblemSolving #BitManipulation
To view or add a comment, sign in
-
-
𝐀𝐈 𝐜𝐨𝐝𝐢𝐧𝐠 𝐭𝐨𝐨𝐥𝐬 𝐚𝐫𝐞 𝐠𝐫𝐞𝐚𝐭 𝐚𝐭 𝐰𝐫𝐢𝐭𝐢𝐧𝐠 𝐜𝐨𝐝𝐞. 𝐓𝐡𝐞𝐲'𝐫𝐞 𝐭𝐞𝐫𝐫𝐢𝐛𝐥𝐞 𝐚𝐭 𝐤𝐧𝐨𝐰𝐢𝐧𝐠 𝐲𝐨𝐮𝐫 𝐚𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞. Copilot and Claude don't know you route everything through a service layer. They don't know which imports are banned. They don't know your layer boundaries. So they generate perfectly valid code that quietly breaks your rules. 𝐈 𝐛𝐮𝐢𝐥𝐭 𝐀𝐫𝐤𝐥𝐢𝐧𝐭 𝐭𝐨 𝐟𝐢𝐱 𝐭𝐡𝐢𝐬. You define your architectural rules in a plain YAML file. Arklint enforces them in pre-commit hooks and CI and exposes them to AI tools via MCP so they check your rules before writing code. 𝐓𝐨𝐝𝐚𝐲 it hit 𝐯1.0.0. Native packages for Python, Node.js, and .NET. But 𝐥𝐚𝐧𝐠𝐮𝐚𝐠𝐞 𝐚𝐠𝐧𝐨𝐬𝐭𝐢𝐜 beyond that. If Python's on your machine, Arklint works on any codebase. 📦 𝐏𝐲𝐏𝐈 → 𝐩𝐢𝐩 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐚𝐫𝐤𝐥𝐢𝐧𝐭 📦 𝐧𝐩𝐦 → 𝐧𝐩𝐱 𝐚𝐫𝐤𝐥𝐢𝐧𝐭 📦 𝐍𝐮𝐆𝐞𝐭 → 𝐝𝐨𝐭𝐧𝐞𝐭 𝐭𝐨𝐨𝐥 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐚𝐫𝐤𝐥𝐢𝐧𝐭 🌐 𝐀𝐧𝐲 𝐨𝐭𝐡𝐞𝐫 𝐬𝐭𝐚𝐜𝐤 → 𝐣𝐮𝐬𝐭 𝐧𝐞𝐞𝐝𝐬 𝐏𝐲𝐭𝐡𝐨𝐧. "𝒑𝒊𝒑 𝒊𝒏𝒔𝒕𝒂𝒍𝒍 𝒂𝒓𝒌𝒍𝒊𝒏𝒕" 𝐚𝐧𝐝 𝐲𝐨𝐮'𝐫𝐞 𝐝𝐨𝐧𝐞. If this solves a problem you've had 𝐭𝐫𝐲 𝐢𝐭, 𝐬𝐭𝐚𝐫 𝐢𝐭 𝐨𝐧 𝐆𝐢𝐭𝐇𝐮𝐛, and if you want to shape where it goes next, Want native support for your stack? The repo is open and contributions very welcome! Built this with Claude as my co-pilot, the irony of using AI to build a tool that keeps AI in check isn't lost on me. 😄 𝐋𝐢𝐧𝐤 𝐢𝐧 𝐜𝐨𝐦𝐦𝐞𝐧𝐭𝐬 👇 #SoftwareArchitecture #Devtools #AIEngineering #CleanArchitecture #CleanCode #TechDebt #SoftwareEngineering #PyPI #npm #NuGet
To view or add a comment, sign in
-
-
A Lesson in Parity and Circular DP 🚀 After a long break from the LeetCode contest circuit, I jumped back in for Weekly Contest 496. I managed to solve 4/4, AK!. But it wasn't a perfect run—I had 3 Wrong Answer (WA) penalties along the way! The "contest rust" was real, but those mistakes forced me to dig deeper into my Dynamic Programming fundamentals. Here are the exact techniques I used to solve the hardest problems of the set (Q3 and Q4): 💡 Technique 1: Prefix/Suffix Management for "Skip" Logic (Question 3) Q3 required us to find the minimum operations to make an array satisfy maximum peak conditions. The catch? Managing the transitions, especially for even-sized arrays where you are forced to "skip" certain elements to maintain parity. The Approach: Instead of recalculating the cost every time, I used Prefix and Suffix states. By pre-calculating the cumulative cost of forming peaks from the left (prefix) and from the right (suffix), you can efficiently calculate the total cost of forcing a "skip" at any arbitrary index i in O(1) time per index. 💡 Technique 2: Breaking Circular Dependencies (Question 4) Q4 was a brilliant extension of Q3, but the array was now circular. The Approach: I used Recursive DP with Memoization, utilizing a classic trick of breaking the circle. You cannot evaluate a circular array in one clean sweep. Instead, you branch it into two Pass scenarios: Pass 1: Assume the 0th index IS utilized. This means you must explicitly block the (n-1)th index from being used to prevent a circular clash. Pass 2: Assume the 0th index is NOT utilized. Now, the (n-1)th index is free to be evaluated normally. By taking the minimum of minOps(Pass 1) and minOps(Pass 2), you safely cover all valid combinations. #LeetCode #DynamicProgramming #Algorithms #TechInterviews #SeniorSoftwareEngineer #SDE
To view or add a comment, sign in
-
-
🚇 Just Built a Subway Payment System in Python I recently developed a command-line Subway Payment System that simulates how real-world transport systems work. 🔹 Features: 1. Card check-in and check-out 2. Trip tracking system 3. Average travel time calculation This project helped me understand how systems manage user transactions and data flow. I’m currently working on improving it and possibly turning it into a web application. Special thanks to Patrick Dwamena and Stephen Nyarko for support during this project 🙌 #Python #BackendDevelopment #Projects #SoftwareEngineering
To view or add a comment, sign in
-
Most beginner backend projects die in refactoring. Here's the structure I use to prevent that. When I built my Task Manager CLI, I learned this the hard way — a monolithic file that worked until it very much didn't. After refactoring, here's the structure I now start with: Before writing a single line: → Define your data model first → Identify all operations (CRUD) you'll need → Map inputs, outputs, and error states While building: → One module per concern (routes, models, utils, exceptions) → Validate inputs at the boundary — not deep inside logic → Handle errors explicitly — no silent failures Before shipping: → Test the unhappy paths, not just the happy ones → Read your own code like a stranger would This approach reduced my debugging effort by 40% on a real project. It works at any scale — from a CLI tool to a FastAPI service. What's the first thing you do when starting a new backend project? #BackendDevelopment #Python #FastAPI #SoftwareEngineering #CodingTips
To view or add a comment, sign in
-
𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗶𝗻𝗴 𝗞𝗮𝗶𝗿𝗼! About a year and a half ago, my friends and I started building a programming language. We'd been writing systems-level code across C++, Rust, and lower-level tooling for long enough to have strong opinions about what was missing. C++ gives you performance and the richest library ecosystem in systems programming, but the language fights you at every turn undefined behavior, header hell, decades of accumulated complexity. Rust solves the safety problem but introduces real cognitive overhead and a syntax that trades readability for compiler appeasement. We wanted something that didn't force that tradeoff. So we built Kairo a statically typed systems programming language with bidirectional C++ interoperability, readability-first syntax, and a memory safety model that gives you both manual and automatic memory tracking without fighting a borrow checker. 𝗪𝗵𝗲𝗿𝗲 𝘄𝗲 𝗮𝗿𝗲 𝗻𝗼𝘄 The project has come a long way. We shipped a Stage 0 bootstrap compiler, then used it to build a Stage 1 self-hosted compiler; Kairo is being written in Kairo itself! The language, toolchain, and ecosystem are actively under development and roughly halfway to a production release. 𝗪𝗵𝗮𝘁 𝗺𝗮𝗸𝗲𝘀 𝗞𝗮𝗶𝗿𝗼 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 - Bidirectional C++ FFI call C++ from Kairo and Kairo from C++, no bindings layer required. - Readability-first design. Code should be readable by default, not after three months of pattern memorization. - BCIR/AMT memory safety model manual and automatic memory tracking with safety guarantees, without Rust's borrow checker annoyance. - Planned interop expansion to Python and Rust. - Full access to the existing C++ library ecosystem from day one. 𝗖𝗼𝗻𝘁𝗿𝗶𝗯𝘂𝘁𝗼𝗿𝘀 :Arnav Goyal , Dhruvan Kartik and Me 𝗟𝗶𝗻𝗸𝘀 - Website: https://www.kairolang.org - Github: https://lnkd.in/gZEdW2Gi We're a three-person team and the project has 360+ GitHub stars. If this interests you, a star, an issue report, or a contribution all help. #CompilerDev #Compiler #tech #buildinpublic #SystemsEngineering
To view or add a comment, sign in
-
-
I have been thinking less about agents and more about paths. A lot of software still assumes execution is: - an app flow - an async mesh - or an agent stack But human work usually looks messier and more real: you carry something, fork, test, return, defer, resume, and only sometimes settle. So I have been exploring a path-style runtime where: - push opens a fork - pop rejoins or abandons a fork - skills attach to the path - memory keeps residue - repeated signals reinforce instead of just duplicating noise The interesting question is not “what is the next token?” It is more like: - what is still being carried? - what changed direction? - what can be deferred? - what actually needs to settle? I may post a tiny Python demo of path execution next. https://lnkd.in/eairkdJK #runtime #systems #paths #softwarearchitecture
To view or add a comment, sign in
-
-
#The_most_expensive_comma_I’ve_ever_typed. 💸 I recently spent way too long debugging a background task that was "failing successfully." No errors in the frontend, no crashes in the logs—just... silence. The culprit? A single trailing comma at the end of a string: #email_body = "Hello there...", In Python, that tiny comma turns your intended String into a Tuple. So, instead of sending a block of text to the email handler, I was sending ("Hello there...",). Because we had fail_silently=True enabled in our background thread (standard practice to keep the UI snappy), the system was quietly choking on the Tuple and dying without a word. #The Lesson: Syntax Matters: Even in a "readable" language like Python, one character changes the entire data structure. The Danger of Silence: fail_silently is a double-edged sword. It keeps the user experience smooth, but it can bury the "why" during development. Log Everything: If it’s failing silently, make sure your logger isn’t! Has a single character ever brought down your entire workflow? Let’s commiserate in the comments. 👇 #Python #SoftwareEngineering #CodingLife #Debugging #Django #WebDevelopment
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