☕ Biggest IPO Ever
Ant Group will be IPO'ing in China. It will be the largest ever IPO. Ant Group is a spinoff from Alibaba, the world's largest e-commerce retailer.
Hey Guys,
Hope you’re all having a great day!
Interview Problem
What is Map Reduce? Why is it useful?
Can you give an example use case?
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 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”
Industry News
Ant Group will raise $34 billion dollars in world’s biggest IPO
Stock markets in China have been enjoying a boom this year, pushing many companies towards the IPO path.
Ant Group is no exception, and they’re looking to raise $34 billion dollars in a massive IPO that spans Shanghai and Hong Kong. This would be the largest ever IPO, beating the previous largest (Saudi Aramco) by more than $4 billion dollars.
Ant Group started as an escrow service for Alibaba (the world’s largest e-commerce retailer, also based in China and started by Jack Ma) but has since expanding into one of the world’s largest fintech companies. They process trillions of dollars in payments annually, run one of the world’s largest money-market funds and facilitate small loans to hundreds of millions of consumers and small businesses. The company has almost single-handedly modernized China’s financial infrastructure.
Alipay is Ant Group’s online payment platform, and it overtook PayPal as the world’s largest mobile payment platform in 2013. As of 2018, the number of Alipay users reached 870 million people, with Alipay controlling 55% of the third-party payment market in mainland China.
Seeing the success of Alipay, Ant went on to build a money-market mutual fund which would allow Alipay users to earn interest on the deposits they kept in the app. The mutual fund is called Yu’e Bao (pronounced “Yoo Uh Bow”, it means “leftover treasure”) and is now one of the world’s largest mutual funds. The fund shocked banking executives with it’s incredibly fast growth. Customers flocked to the service because it was extremely easy to use and paid better interest rates than what other bank accounts offered. More than a third of the Chinese population now uses the service.
TikTok announces partnership with Shopify
E-Commerce has been exploding during the pandemic, with many consumers shifting their shopping patterns due to stay-at-home restrictions. One of the biggest winners from this trend is Shopify, a platform that allows small businesses to build and host e-commerce stores. Shopify has seen their stock price go from a high of $543 dollars (before the stock market crash in March) to $1071 dollars today, a gain of nearly 100%. Their market cap is now at $130 billion dollars.
The company is now adding TikTok to their portfolio of partners that includes other social sites like Facebook, Instagram and Pinterest. This allows Shopify store owners to easily use the TikTok platform to reach new audiences and generate more sales.
Shopify merchants will be able to connect to a TikTok for Business account and create native, shareable video ads to post on TikTok. They can then track the video’s performance and see the demographics of the video’s audience across gender, age and user behavior. Merchants can also install a “TikTok Pixel”, which allows them to more easily track sales conversions (how many TikTok viewers saw their ads, went to their site and then made a purchase).
To kick off the partnership, merchants are being offered a $300 ad credit on the TikTok platform.
Previous Solution
As a refresher, here’s the previous question
Given an array of elements, return the length of the longest subarray where all its elements are distinct.
Example
Input - [15, 11, 23, 15, 2, 23, 4, 11]
Output - 5, since the longest subarray of distinct elements is [15, 2, 23, 4, 11]
Solution
We want to find the length of the longest subarray with distinct elements.
We can do this by going through the array and calculating the length of the longest subarray to the current number and then having another variable that keeps track of the longest distinct subarray we’ve seen so far.
How can we find the length of the longest subarray to the current number in O(1)
time? By using a dictionary (hash table)!
We keep the index of the most recent occurrence of every number we come across in the hash table.
As we’re iterating through the array, we first check to see if we’ve already seen the current number (by checking if it’s in our hash table).
If we have seen the number before, then we check what the most recent occurrence was. If the most recent occurrence was within our current longest distinct subarray, then that means our subarray is no longer distinct!
We should check if our previous distinct subarray is the longest one we’ve seen so far (and if so, save that length in a variable) and then start a new distinct subarray where it starts and 1 + index of most recent occurrence.
Continue this process for the entire array and you’ll have your longest distinct subarray length! Time and Space complexity are both linear!