- InstaByte
- Posts
- Anthropic files for IPO
Anthropic files for IPO
ALSO: What is Consistent Hashing?

Welcome back!
Most people are scared of Microsoft and Google interviews. But sometimes, they do ask easy problems. We’ll solve one such problem this week.
Today we will cover:
Diameter of Binary Tree problem
Consistent Hashing
Read time: under 4 minutes
CODING CHALLENGE
Diameter of Binary Tree
Given the root of a binary tree, return the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.
The length of a path between two nodes is represented by the number of edges between them.
Example:

Input: root = [1,2,3,4,5]
Output: 3
Explanation: 3 is the length of the path [4,2,1,3] or [5,2,1,3].Solve the problem here before reading the solution.
PRESENTED BY MINTLIFY
AI agents now read your docs almost as much as humans do.
Mintlify analyzed 790 million requests across its documentation platform. The finding: AI coding agents account for 45.3% of all traffic, nearly tied with traditional browsers at 45.8%.
Two tools are driving almost all of it:
Claude Code: 25.2% of total traffic, more requests than Chrome on Windows
Cursor: 18% of total traffic
Together they account for 95.6% of all identified AI agent traffic
The rest of the field, OpenCode, Trae, ChatGPT, and NotebookLM, is showing up but nowhere close.
One caveat: OpenAI's Codex doesn't send an identifiable user-agent header, so the real agent percentage is likely even higher.
The takeaway for anyone maintaining developer docs: your documentation now serves two audiences. Structure and machine-readability matter as much as clarity for human readers.
SOLUTION
To solve this problem, we'll use a depth-first search (DFS) approach. Here's how it works:
For each node, we need to find the height of the subtree rooted at this node. The height of a subtree is the longest path from the node to any leaf, excluding the node itself.
After that, calculate the diameter at the node. The diameter passing through a node is the sum of heights of its left and right subtrees.
Lastly, update the maximum diameter if current node gives a larger value and return the height of current node's subtree.
The time complexity is O(n) where n is the number of nodes because we visit each node exactly once.
Note that in the solution below, we store max_diameter in a list. You can also use self.max_diameter if you prefer using an integer.

LATEST DEV TOOLS
From idea to shipped tool in 11 minutes.
Type the problem in Slack. Viktor writes the code, deploys to your subdomain, posts the URL, and starts using it on your next request. No specs, no Jira, no kickoff. Founders are running entire companies this way.
SYSTEM DESIGN
Consistent Hashing

Consistent Hashing is a clever way to distribute data across multiple servers. Consistent Hashing helps us minimize chaos when a new server is added or a server goes down. Let’s see how it works.
When you need to store data across multiple servers (or nodes), you need a system to decide which data goes where. The simplest approach might be to take your data's hash value and do a modulo operation (%) with the number of servers. But this has a big problem. When you add or remove a server, most of your data needs to move to different locations. This creates unnecessary network traffic and strain on your system.
Consistent hashing solves this by creating a ring which maps to different hash values. So, if our hash value lies between 0 to 360, 0 to 60 degrees on the ring represent hash values between 0 and 60. The next 60 degrees represent hash values between 60 to 120 and so on. If you understood that, here’s how Consistent Hashing works:
First, you pick a value K (let's say K=3) which represents how many "virtual copies" each server gets on the ring. Each server is placed at K different positions around the ring. When you need to store a piece of data, you hash it and find its position on the ring. You then move clockwise until you hit the first server - that's where the data is stored.
The beauty of this approach is what happens when servers change. If a server fails, only the data that was specifically assigned to that server needs to move - everything else stays put. Similarly, when you add a new server, it only takes some data from its immediate neighbors on the ring, rather than triggering a massive reshuffle.
NEWS
This Week in the Tech World

Anthropic Files for IPO: The Claude maker confidentially submitted S-1 paperwork to the SEC, targeting a potential trillion-dollar debut. Valued at $965B following a $65B fundraise, it beats rival OpenAI to the filing.
SpaceX Eyes $1.75T Listing: SpaceX is heading for an IPO at a near-$1.75 trillion valuation, joining Anthropic in what's shaping up as a wave of landmark mega-listings.
Microsoft Unveils Seven AI Models: At Build, Microsoft launched MAI-Thinking-1, its first reasoning model, plus MAI-Code-1-Flash — a coding model using 60% fewer tokens — among seven new MAI releases.
GitHub Copilot Goes Token-Based: All Copilot plans switched to usage-based billing, replacing flat subscriptions with monthly AI Credit allotments — a shift that sparked immediate pushback from developers.
Nvidia Enters the PC Chip Market: Nvidia's RTX Spark, a Grace-Blackwell SoC with up to 128GB unified memory, is coming to laptops and mini-PCs from Dell, HP, Microsoft, and 30+ other designs this fall.
Social Platforms Settle School Suits: YouTube, Snap, TikTok, and Meta settled a landmark school-district addiction lawsuit — one of 1,200+ cases alleging the platforms fueled a youth mental health crisis.
EU Proposes Digital Sovereignty Package: The European Commission proposed a tech sovereignty package to strengthen Europe's digital autonomy and resilience, adding pressure to global tech firms navigating a crowded regulatory landscape.
FEATURED COURSES
5 Courses of the Week
✅ Google IT Automation with Python Professional Certificate: Automate real-world IT tasks using Python, Git, and Bash scripting across a 6-course program designed by Google engineers. Build the skills to manage systems at scale and advance into DevOps or SRE roles.
✅ Microsoft Azure Data Engineer Associate Professional Certificate: Design and implement enterprise-scale data solutions on Azure, covering data pipelines, Azure Synapse Analytics, and Databricks. Aligned with the DP-203 certification exam to validate your cloud data engineering skills.
✅ Meta Back-End Developer Professional Certificate: Build server-side applications and APIs using Python, Django, and REST principles across a 9-course program from Meta's engineering team. Graduate with a portfolio of projects and interview-ready back-end skills.
✅ IBM AI Engineering Professional Certificate: Go deep on neural networks, deep learning, and model deployment with hands-on labs in PyTorch, Keras, and IBM Watson. A rigorous intermediate-to-advanced program for engineers ready to build production AI systems.
✅ Applied Data Science with Python Specialization: Master data manipulation, visualization, machine learning, and text analysis using Python's most powerful libraries — pandas, matplotlib, scikit-learn, and NLTK. Built by the University of Michigan for learners ready to go beyond the basics.
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.
BONUS
Just for laughs 😏

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,


