- InstaByte
- Posts
- AI writes 30% of Microsoft code
AI writes 30% of Microsoft code
ALSO: Throttling vs Rate limiting in APIs
Welcome back!
This week’s coding challenge is a FAANG favorite. There are multiple ways to solve it. What's your approach?
Today we will cover:
Remove Nth Node From End of List
Throttling vs Rate limiting in APIs
Read time: under 4 minutes
CODING CHALLENGE
Remove Nth Node From End of List
Given the head
of a linked list, remove the n
-th node from the end of the list and return its head
.
Example 1:

Input: head = [1,2,3,4,5], n = 2
Output: [1,2,3,5]
Example 2:
Input: head = [1,2], n = 1
Output: [1]
Solve the problem here before reading the solution.
PRESENTED BY HUBSPOT
Build HubSpot Apps, Faster
HubSpot’s AI-powered ecosystem represents a $10.2 billion global opportunity by 2028. To capitalize on that growth potential, we are opening our platform more, starting with expanded APIs, custom UI, and tools for a unified data strategy.
SOLUTION
To solve this problem, we can use two pointers: a fast
pointer and a slow
pointer.
Initially, both the pointers are at the head
of the linked list. The fast
pointer will move n
nodes ahead first. After that, both pointers will move together until the fast
pointer reaches the end.
At this point, the slow
pointer will be at the node just before the one we want to remove. So we simply remove the next node by updating the next
pointer of node at slow
pointer.
There’s a special case when n
equals the length of the list. In this case, we simply want to remove the first node and return head.next
.
The time complexity of this solution is O(n)
, where n
is the length of the linked list.

SYSTEM DESIGN
Throttling vs Rate limiting in APIs

When your API becomes popular, you need to protect it from being overwhelmed by too many requests. This is where throttling and rate limiting come in. While these terms are often used interchangeably, they serve different purposes in API management.
Rate limiting is like setting a hard limit on the number of requests a client can make in a specific time window. For example, you might allow each user to make 100 requests per hour. Once a user hits this limit, their requests are rejected until the next hour begins. Rate limiting is straightforward to implement and understand, making it a common choice for simple API protection.
Throttling takes a more flexible approach. Instead of outright rejecting requests, throttling slows down the rate at which requests are processed when the system is under heavy load. Think of it as a "soft limit" that adapts to current conditions. When the system is busy, requests might be delayed or queued rather than rejected.
For example, if your API normally handles 1000 requests per second but suddenly receives 2000 requests per second, throttling might slow down the processing rate to maintain system stability. This is particularly useful during traffic spikes or when you want to ensure fair resource distribution among users.
Both approaches have their place in API management. Rate limiting works well when you need strict control over resource usage, like in freemium models where different subscription tiers get different request limits. Throttling is better when you want to maintain service availability during unexpected traffic spikes.
Here's a comparison of the two approaches:
Feature | Rate Limiting | Throttling |
---|---|---|
Behavior | Rejects excess requests | Delays or queues requests |
Implementation | Simpler | More Complex |
Response | Fixed limits | Adaptive to load |
Best For | Strict resource control | Managing traffic spikes |
FEATURED COURSES
5 Courses of the Week
✅ Stanford’s Algorithms Specialization: Covers algorithm fundamentals with programming assignments. Great for technical interviews and building conceptual understanding.
✅ Microsoft’s Python Certificate: 6-course certificate for beginners covering Python basics to advanced concepts including generative AI and Azure cloud deployment, with career support.
✅ Advanced Learning Algorithms: Learn neural networks with TensorFlow, best practices, and tree ensemble methods. Part of Andrew Ng's Machine Learning Specialization.
✅ Regression & Forecasting for DS with Python: Master time-series analysis, forecasting and linear regression in Python. Learn data preparation, model building and interpretation.
✅ Statistics with Python: Learn statistical analysis with Python, from data collection to advanced modeling through assignments and Jupyter Notebooks.
LEARN AI
Start learning AI in 2025
Keeping up with AI is hard – we get it!
That’s why over 1M professionals read Superhuman AI to stay ahead.
Get daily AI news, tools, and tutorials
Learn new AI skills you can use at work in 3 mins a day
Become 10X more productive
NEWS
This Week in the Tech World

Microsoft code increasingly AI-written: Microsoft CEO Satya Nadella revealed that 20-30% of the company's code is now written by AI. Speaking at Meta's LlamaCon event, Nadella noted this percentage is steadily increasing as AI coding capabilities improve.
Meta launches standalone AI app: Meta has unveiled a standalone AI app powered by its Llama model to compete directly with ChatGPT. The app includes a Discover feed showing how others use the tool. Meta AI had 700 million monthly active users as of January.
Google enforces RTO policy: Google is requiring remote employees to return to office three days weekly or face termination. Those living more than 50 miles from an office can remain remote but must adopt hybrid schedules for new roles. Google joins Amazon, Dell, and Intel in scaling back remote work.
Duolingo goes "AI-first": Duolingo CEO Luis von Ahn announced the company will gradually replace contractors with AI for repetitive tasks. The language app will consider AI use in hiring and performance reviews, only adding headcount when teams cannot further automate their work.
Waymo partners with Toyota: Alphabet's Waymo and Toyota announced a partnership to bring robotaxi technology to personally-owned vehicles. The companies will leverage Waymo's autonomous tech with Toyota's vehicle expertise while potentially incorporating Toyota vehicles into Waymo's ride-hailing fleet.
Uber increases office requirements: Uber is requiring all employees, including previously approved remote workers, to come to the office Tuesday through Thursday starting June. CEO Dara Khosrowshahi said "good is not going to be good enough" and that being in-office fuels collaboration and creativity.
Intel attracts interest for 18A process: Intel has received interest from customers for test chips using its forthcoming 18A manufacturing process. CEO Lip-Bu Tan reaffirmed commitment to Intel's foundry business, with high-volume production planned for the second half of 2025.
BONUS
Just for laughs 😏

HELP US
👋 Hi there! We are on a mission to provide as much value as possible for free. If you want this newsletter to remain free, please help us grow by referring your friends:
📌 Share your referral link on LinkedIn or directly with your friends.
📌 Check your referrals status here.
YOUR FEEDBACK
What did you think of this week's email?Your feedback helps us create better emails for you! |
Until next time, take care! 🚀
Cheers,