☕ One More Thing...

A startup went from 0 to a 2 billion dollar valuation in less than 2 years. Apple unveils their M1 chip and it changes everything for the macbook lineup.

Good Morning Planet Earth!

Hope you’re all having a fantastic day!

Let’s get to the Interview Question, Daily News and Previous Solution!

Interview Question

How would you build a spelling correction system?

Possible Follow On Questions

  • How would you check if a word is misspelled?

  • How would you find possible suggestions?

  • How would you rank the suggestions for the user?

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

Apple announces new Mac lineup with Apple’s Arm-based M1 processor

Previously, Apple’s Mac lineup used Intel CPUs, but now Apple is switching to the M1 processor, an Arm-based chip that Apple has designed and built themself.

The M1 chip is similar to the processor that’s in the iPhone 12 and recent iPad Air. It has eight cores, four high-performance cores and four high-efficiency cores, in an effort to balance power and battery-life.

The result of this is massive improvements in performance and battery life.

  • New Macbook Air - 3.5x faster than the previous macbook air with nearly 40% more battery life (15 hours of wireless web browsing and 18 hours of video playback)

  • New Macbook Pro - 2.8x faster than the previous macbook pro with more than 50% more battery life (17 hours of wireless web browsing and 20 hours of video playback)

Another cool thing is that since the new macbooks are using the same processors as the iPhone 12 and iPad Air, you can natively run iOS and iPadOS apps on macOS!

Unfortunately, it’s hard to get a more detailed view on how the M1 chip changes things since the computers haven’t shipped yet (these stats are from Apple’s presentation).

Hopin valued at $2.125 billion dollars, just 2 years after launch

Reid Hoffman famously wrote Blitzscaling for startups that experience hypergrowth. There are few startups that will ever experience something close to what Hopin is currently going through.

Hopin was founded in January 2019 as a way to provide an online experience for physical conferences. When COVID hit earlier this year, the company was perfectly positioned to step in. They grew their annual recurring revenue (ARR) from $0 to $20 million dollars in 9 months and are now valued at more than $2 billion dollars.

Earlier this year they raised $40 million dollars in their series A and now, just a few months later, they’ve announced their series B round where they’re raising $125 million dollars.

The company plans on using this money to aggressively hire software developers. Currently, their team is 50% developers and currently plan to expand to 800 staffers by 2021 (half of whom will be technical talent).

The company is also very close to profitability, which is extremely rare for a company going through such hyper growth.

Previous Solution

As a reminder, here’s the previous question

You’re given an array of strings as input. The strings will only contain lowercase letters from a-z. Group all the anagrams in the array together and return the resulting array. An anagram is a word that can be formed by rearranging the letters of another word.

Input: [“yx“, “abe”, “act”, “eab”, “x“, “eba“, “tca“, “xy“]

Output:

[

[“abe”, “eab”, “eba”],

[“act”, “tca”],

[“xy”, “yx”],

[“x”]

]

Here’s the question in LeetCode.

Solution

Two strings are anagrams of one another if they have the exact same character counts. In other words, “actt” and “tact” are anagrams since both strings have 1 a, 1 c and 2 t’s.

Therefore, all we care about (when making the anagram comparison) is the character counts! Therefore, we can just encode each string as a count of each character from a-z. For example, “tact” would be

1-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-2-0-0-0-0-0-0.

Then, we can create a hash table where the key is the character-count encoding and the values are the original strings (from the input array) that map to that encoding.

You can check the code out (and run it!) using this REPL.

Thanks for reading and be sure to reply back with any feedback! I love critical feedback!

Best,

Arpan