- InstaByte
- Posts
- China hosts robot Olympics
China hosts robot Olympics
ALSO: Load Balancing Algorithms

Welcome back!
Let’s solve the Game of Life today! Jokes apart, this is one of the most famous problems asked by FAANGs. Let’s solve it together.
This week, we will cover:
Game of Life
Load Balancing Algorithms
Read time: under 4 minutes
CODING CHALLENGE
Game of Life
According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."
The board is made up of an m x n
grid of cells, where each cell has an initial state: live (represented by a 1
) or dead (represented by a 0
). Each cell interacts with its eight neighbors (horizontal, vertical, diagonal) using the following four rules (taken from the above Wikipedia article):
Any live cell with fewer than two live neighbors dies as if caused by under-population.
Any live cell with two or three live neighbors lives on to the next generation.
Any live cell with more than three live neighbors dies, as if by over-population.
Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
The next state of the board is determined by applying the above rules simultaneously to every cell in the current state of the m x n
grid board
. In this process, births and deaths occur simultaneously.
Given the current state of the board
, update the board
to reflect its next state.
Note that you do not need to return anything.
Example 1:

Input: board = [[0,1,0],[0,0,1],[1,1,1],[0,0,0]]
Output: [[0,0,0],[1,0,1],[0,1,1],[0,1,0]]
Example 2:

Input: board = [[1,1],[1,0]]
Output: [[1,1],[1,1]]
Solve the problem here before reading the solution.
PRESENTED BY PACASO
Big investors are buying this “unlisted” stock
When the founder who sold his last company to Zillow for $120M starts a new venture, people notice. That’s why the same VCs behind Uber and eBay also backed Pacaso. They made $110M+ in gross profit to date. They even reserved the Nasdaq ticker PCSO. Now, you can join, too.
Paid advertisement for Pacaso’s Regulation A offering. Read the offering circular at invest.pacaso.com. Reserving a ticker symbol is not a guarantee that the company will go public. Listing on the NASDAQ is subject to approvals.
SOLUTION
To solve the Game of Life problem, we'll use an in-place modification technique that allows us to track both the current and next state of each cell simultaneously.
We'll introduce two new states to represent the transition:
2 represents a cell that was 0 and will become 1
-1 represents a cell that was 1 and will become 0
This approach allows us to modify the board while preserving the original information needed to determine neighboring cell states.
The algorithm works as follows:
Check each cell's neighbors
Apply the Game of Life rules
Convert the temporary states back to 0 and 1
Time complexity is O(m*n)
, where m
and n
are the board dimensions.
Space complexity is O(1)
as we modify the board in-place.

HEARD OF SUPERHUMAN 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
SYSTEM DESIGN
Load Balancing Algorithms

When your website becomes popular and a single server can't handle all the traffic, you need multiple servers to share the load. But how do you decide which request goes to which server? This is where load balancing algorithms come in.
Let's look at the most common load balancing algorithms and understand when to use each one.
Round Robin is the simplest approach. The requests are distributed to servers in a circular order. Server 1 gets the first request, Server 2 gets the second, and so on. When we reach the last server, we start over from Server 1. While simple to implement, Round Robin assumes all servers are equally capable and all requests take similar time to process.
Weighted Round Robin improves on this by assigning weights to servers based on their capacity. A server with weight 2 will receive twice as many requests as a server with weight 1. This works well when you have servers with different processing powers.
Least Connections sends new requests to the server handling the fewest active connections. This is particularly useful when request processing times vary significantly. For example, in an e-commerce site where some users browse quickly while others spend time checking out, Least Connections ensures no server gets overwhelmed.
Least Response Time goes a step further by considering both the number of active connections and the server's response time. This helps identify servers that might be struggling even if they have fewer connections.
IP Hash uses the client's IP address to determine which server should handle the request. This ensures that requests from the same client always go to the same server, which is useful when you need to maintain session data.
FEATURED COURSES
5 Courses of the Week
✅ Microsoft Back-End Developer Professional Certificate: Master server-side programming with .NET, C#, and Azure Cloud, developing scalable applications using AI tools.
✅ IBM Generative AI Certificate: Master LLMs, transformers, and NLP. Build AI apps using BERT, GPT, LLaMA. Includes hands-on projects using LangChain and RAG.
✅ AI Programming with Python: Build Python fundamentals for AI using NumPy, Pandas, and Matplotlib. Learn deep learning frameworks like PyTorch and natural language processing with Transformers.
✅ Learn DevOps: Docker, Kubernetes, Terraform and Azure DevOps: Complete DevOps training covering containerization, orchestration, infrastructure as code, and CI/CD pipelines across AWS, Azure, and Google Cloud platforms.
✅ Intermediate Python: Learn Python skills needed for complex applications like file classification and web scraping. Build a professional portfolio.
NEWS
This Week in the Tech World

China hosts robot Olympics: First "World Humanoid Robot Games" concludes in Beijing with 280 teams from 16 countries. Chinese companies like Unitree compete with Tesla's Optimus as China targets humanoid robots as key industry by 2027.
OpenAI launches cheapest plan: OpenAI introduces ChatGPT Go in India for $4.57/month, its most affordable offering yet. The plan provides 10x more message limits and access to GPT-5 as OpenAI targets its second-largest user market.
Nvidia eyes China chip: Nvidia evaluates new AI chip called B30A for China market, potentially more powerful than current H20. The company agreed to give US government 15% cut of China sales to resume chip exports after April ban.
Databricks hits $100B valuation: Data analytics firm Databricks joins exclusive $100B+ private company club alongside SpaceX, ByteDance, and OpenAI. The company is raising over $1B in funding with 50% revenue growth.
Apple boosts India production: Apple ramps up iPhone manufacturing in India across five factories as US pressures India over Russian oil purchases. Treasury Secretary warns of 50% tariffs on India for "profiteering" from cheap Russian oil.
SoftBank invests $2B in Intel: Japanese conglomerate SoftBank pays $23/share for 2% stake in struggling chipmaker Intel. The investment supports Intel as it battles to capitalize on AI boom and secure foundry customers.
Starlink suffers brief outage: Elon Musk's satellite internet service experiences second outage in two weeks, affecting millions of users globally. SpaceX continues expanding constellation with new launches despite California regulatory pushback.
Epic unveils AI assistants: Epic Systems announces 200 AI features in development, including Emmie for patients, Art for doctors, and Penny for admin tasks. The health software giant serves 280 million Americans through its electronic health records.
WHAT'S NEW IN AI?
AI You’ll Actually Understand
Cut through the noise. The AI Report makes AI clear, practical, and useful—without needing a technical background.
Join 400,000+ professionals mastering AI in minutes a day.
Stay informed. Stay ahead.
No fluff—just results.
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,