Cal Newport, a longtime critic of digital distraction, has been turning his sights on AI. In a recent article, he addresses AI coding assistants. His argument: coding assistants lead to programmer deskilling, meaning programmers who use these tools are losing their rare and valuable skills, replacing them with just the ability to orchestrate agents. In […] The post Will AI Coding Assistants…
In the AI coding assistant era, we can onboard an AI assistant much like a human programmer: by pointing it to documentation and code. But there’s a key difference: while human programmers remember things from one day to the next, AI assistants start each session with a blank slate. Context Engineering Since coding assistants forget […] The post Stateless by Design: How to Work With AI Coding…
Roman Elizarov noticed something different about the 2024 Advent of Code: AI is reshaping competitive programming, not just in benchmarks or papers, but in real life. My rough guess: this year’s Advent of Code leaderboard features ~80% AI-driven entries in the top 100 for the first time. Advent of Code is still an amazing event […] The post Do Coding Bots Mean the End of Coding Interviews?…
Last week wrapped up the dynamic programming tutorial for this year. I hope you found it useful. Dynamic programming can be hard to grasp at first compared to other LeetCode topics. But once you internalize the steps to find a top-down solution, you may actually be happy when an interviewer asks you to solve a […] The post Another Project for 2024 appeared first on Red-Green-Code .
Over the past four months, we covered the key ideas in dynamic programming and solved a few practice problems. Let’s review. Concepts Dynamic programming, unlike most other LeetCode topics, is a process for designing algorithms rather than a single algorithm. That makes DP practice a good way to learn the process of finding solutions, rather […] The post Dynamic Programming Wrap-Up appeared first…
Last week, we looked at a dynamic programming counting problem, Climbing Stairs. This week’s problem, LeetCode 91: Decode Ways, is also a counting problem. And although the problems may not seem very similar on the surface, we can adapt the Climbing Stairs solution to solve Decode Ways. The input to the Decode Ways problem is […] The post LeetCode 91: Decode Ways appeared first on Red-Green-Code .
For one subcategory of dynamic programming problems, the goal is to count the number of ways to do something. For example, in LeetCode 62: Unique Paths, we counted the number of ways a robot could move from the start position to the end position in a grid. This week, we’ll tackle another counting problem, LeetCode […] The post LeetCode 70: Climbing Stairs appeared first on Red-Green-Code .
Solutions to LeetCode problems of Medium or higher difficulty often require a key insight. Even once you understand the problem and the general technique required to solve it, there’s no way to implement an efficient solution without it. Fortunately, dynamic programming gives us heuristics that we can use to point towards the required idea. For […] The post LeetCode 221: Maximal Square appeared…
Earlier this year, we solved LeetCode 53: Maximum Subarray, which asked us to find the sum of the subarray (contiguous non-empty sequence of elements) with the largest sum. This week, we’ll look at a related problem that asks for the largest product. Maximum Sum Subarray Review For the maximum sum subarray problem, the maximum sum […] The post Using Dynamic Programming for Maximum Product Subarray…
Many LeetCode problems involve moving around a maze or grid. Mazes tend to be modeled as graphs, but for some problems of this type, dynamic programming is the right approach. We’ll see that in this week’s problem, LeetCode 62: Unique Paths. Unique Paths takes only the two integers m and n as input, representing the […] The post LeetCode 62: Unique Paths appeared first on Red-Green-Code .