Chess AI
An article explaining how Stockfish's Neural Chess Engine works. Visa abandons their planned takeover of Plaid.
Hi Everyone!
Hope you’re all having a great day!
Tech Dive
Our next tech dive will be on Bitcoin! Stay tuned.
Our last tech dives were on Distributed Systems and Database Sharding!
Tech Snippets
The Neural Network of the Stockfish Chess Engine explained
Stockfish is a Chess Engine (give it a chess board and it tells you what move to make) that evaluates 50 million positions per second and uses a feedforward neural network to output a single scalar that gives a numerical score for the position (indicating how favorable it is for the player about to move).
You can view the source code for Stockfish here. Although I highly recommend reading the article that explains Stockfish (linked in the title) first.
Visa abandons planned acquisition of Plaid after DOJ challenge.
Plaid is a fintech company that builds an API for companies to allow users to easily (and safely) connect their financial accounts to an app.
Personal Finance apps like Mint or You Need a Budget use Plaid to allow users of their apps to link their bank accounts.
Visa planed a $5.3 billion dollar takeover of Plaid but their takeover was challenged by the Department of Justice due to antitrust concerns.
Plaid’s CEO, Zach Perret, said that Plaid is in good shape to prosper despite the failed acquisition due to the COVID pandemic. Lots of people have been flocking to personal finance apps since the start of the pandemic and the number of paying Plaid customers has increased 60% since the Visa deal was announced.
Interview Question
Given an integer array nums
, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Here’s the question in Leetcode.
We’ll send a detailed solution tomorrow, so make sure you move our emails to primary, so you don’t miss them!
Gmail users—move us to your primary inbox
On your phone? Hit the 3 dots at the top right corner, click "Move to" then "Primary"
On desktop? Back out of this email then drag and drop this email into the "Primary" tab near the top left of your screen
Apple mail users—tap on our email address at the top of this email (next to "From:" on mobile) and click “Add to VIPs”
Previous Solution
As a refresher, here’s the previous question
Given the head
of a linked list, rotate the list to the right by k
places.
Here’s the question in LeetCode.
Solution
We can solve this question in three parts.
First, we count the number of nodes in the linked list and then set the next
pointer at the tail of the linked list to the head. This makes our linked list a circular linked list.
Now, we want to break the circle in our linked list at our new tail. So, we use k
and the length of our linked list to figure out the new tail.
Then, we go to that node where our new tail is and set the next pointer to None
, breaking the circular aspect of our linked list.
Now, we can return the new head of the linked list.
Best,
Arpan