- InstaByte
- Posts
- Two big layoffs in the same week
Two big layoffs in the same week
ALSO: Monolithic vs Microservices Architecture

Welcome back!
We are going to solve one of the most popular Binary Tree problems in this week’s coding challenge. Every big tech company has asked it at some point. Let’s do this.
Today we will cover:
Maximum Depth of Binary Tree
Monolithic vs Microservices Architecture
Read time: under 4 minutes
CODING CHALLENGE
Maximum Depth of Binary Tree
Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Example 1:

Input: root = [3,9,20,null,null,15,7]
Output: 3Example 2:
Input: root = [1,null,2]
Output: 2Solve the problem here before reading the solution.
PRESENTED BY MINDSTREAM
Turn AI Into Extra Income
You don’t need to be a coder to make AI work for you. Subscribe to Mindstream and get 200+ proven ideas showing how real people are using ChatGPT, Midjourney, and other tools to earn on the side.
From small wins to full-on ventures, this guide helps you turn AI skills into real results, without the overwhelm.
SOLUTION
To solve this problem, we can use a recursive approach. For each node, we calculate the maximum depth of its left and right subtrees, and then return the larger value plus 1 (to account for the current node).
If we reach a null node, we return 0 as the depth. This forms our base case for the recursion.
The time complexity of this solution is O(n), where n is the number of nodes in the binary tree, as we need to visit each node exactly once.

SYSTEM DESIGN
Monolithic vs Microservices Architecture

As applications grow larger and more complex, the traditional monolithic architecture can become difficult to maintain and scale. This is where microservices architecture comes in as an alternative approach.
In a monolithic architecture, the entire application is built as a single unit. All features and functionality are packaged together in one codebase. This makes it simple to develop and deploy initially. You can easily make changes, test the whole application, and deploy everything at once.
But monolithic applications have drawbacks. When the codebase grows too large, it becomes harder for developers to understand the entire system. Making changes becomes risky because a small update in one part could break something elsewhere. Scaling is also inefficient because you have to scale the entire application even if only one feature needs more resources.
Microservices architecture takes a different approach by splitting the application into smaller, independent services. Each service handles a specific business function and can be developed, deployed, and scaled independently. For example, in an e-commerce application, you might have separate services for user accounts, product catalog, shopping cart, and payment processing.
This independence makes microservices more flexible. Teams can work on different services without interfering with each other. If the payment service needs more computing power, you can scale just that service instead of the entire application. You can also use different technologies for different services based on what works best for each function.
But microservices come with their own challenges. Managing communication between services is complex and can introduce network latency. Debugging becomes harder because a single user request might involve multiple services. You also need robust monitoring and logging to track what's happening across all services.
Here's a comparison of both approaches:
Monolithic | Microservices | |
|---|---|---|
Development | Simpler initially | More complex initially |
Deployment | Deploy entire app | Deploy individual services |
Scaling | Scale entire app | Scale specific services |
Maintenance | Harder as app grows | Easier to maintain |
Technology | Single technology stack | Multiple technologies possible |
Testing | Simpler end-to-end testing | Complex integration testing |
FEATURED COURSES
5 Courses of the Week
✅ IBM Data Science Professional Certificate: Learn data science skills using Python, SQL, and machine learning tools to build a professional portfolio in 4 months.
✅ Microsoft Back-End Developer Professional Certificate: Master server-side programming with .NET, C#, and Azure Cloud, developing scalable applications using AI tools.
✅ Stanford’s Algorithms Specialization: Master fundamental algorithms through programming assignments and conceptual learning. This specialization prepares you to excel in technical interviews and communicate fluently about algorithms without focusing on low-level implementation details.
✅ DeepLearning.AI Data Engineering Certificate: Build data pipelines on AWS, design data architectures, and learn batch/streaming processing. Hands-on labs with real-world tools.
✅ IBM’s Intro to Containers w/ Docker, Kubernetes & OpenShift: Learn to build and run applications using containers with Docker, and manage them at scale with Kubernetes and OpenShift. Get hands-on experience through browser-based labs.
WANT THE DEEP VIEW?
Stop Drowning In AI Information Overload
Your inbox is flooded with newsletters. Your feed is chaos. Somewhere in that noise are the insights that could transform your work—but who has time to find them?
The Deep View solves this. We read everything, analyze what matters, and deliver only the intelligence you need. No duplicate stories, no filler content, no wasted time. Just the essential AI developments that impact your industry, explained clearly and concisely.
Replace hours of scattered reading with five focused minutes. While others scramble to keep up, you'll stay ahead of developments that matter. 600,000+ professionals at top companies have already made this switch.
NEWS
This Week in the Tech World

Block Cuts 4,000 Jobs, Cites AI: Jack Dorsey slashes nearly 40% of Block's workforce, saying AI tools are enabling the company to do more with fewer people.
Morgan Stanley Cuts 2,500 Jobs: Morgan Stanley is laying off about 3% of its global workforce across all major divisions, citing shifting priorities and AI automation, despite strong 2025 earnings.
OpenAI's Pentagon Deal Sparks Backlash: ChatGPT uninstalls surged 295% after OpenAI partnered with the Pentagon. Anthropic's Claude hit #1 on the App Store after refusing a similar deal.
Apple Launches $599 MacBook Neo: Apple unveiled its cheapest-ever laptop, powered by an iPhone A18 Pro chip. It's the first Mac not running on an M-series processor.
ChatGPT Starts Showing Ads: OpenAI begins an ad pilot in free ChatGPT, with Criteo as its first ad tech partner. Ads are shown based on conversation context.
NVIDIA Invests $4B in Photonics: NVIDIA pours $2B each into Lumentum and Coherent to lock in next-gen optical networking components for AI data centers.
OpenAI Closes Record $110B Round: Amazon, SoftBank, and NVIDIA lead OpenAI's massive funding round, pushing the company's valuation to $840 billion.
Visa and Stripe Expand Stablecoin Partnership: Visa and Stripe team up to enable stablecoin-backed cards in 100 countries, bridging crypto and traditional payments infrastructure.
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,


