☕ DeepMind AI

DeepMind released a preprint paper with SOTA results in the video question-answering space. Bloomberg acquires a YCombinator company. An awesome Git cheat sheet and a thread by an Ex-Googler on AWS.

Hi Everyone!

Hope you’re having an amazing end of 2020!

If you’re preparing for coding interviews, you should definitely check out Grokking the Coding Interview. This course helped me pass interviews at Facebook and Amazon.

The course has 16 key patterns to coding interviews. Patterns like Sliding Window, Fast and Slow Pointers, Two Heaps, and 13 other patterns.

Being aware of all these 16 patterns will give you a huge advantage in your interviews.

You don’t have to purchase anything to view the patterns!

Check it out here.

Educative is sponsoring Quastor Daily, but that’s because I reached out to them. I’m a big fan of the product.

Tech Dive

Our last tech dives were on Distributed Systems and Database Sharding!

Tech Snippets

Industry News

Bloomberg acquires Second Measure, a data analytics and market data platform.

Second Measure is a YCombinator-backed company that was started 5 years ago.

The company’s business model is that they purchase globs transaction data from credit cards and debit cards. They then use machine learning algorithms to analyze all this data and extract insights. They package these insights into a platform (along with additional data analysis tools) and then sell these insights to hedge funds and businesses (who are looking for data on their competitors).

Uber, for example, was a Second Measure customer. They used Second Measure’s data to get insights on who was the furthest ahead in the food delivery space and where they were growing.

Bloomberg has now purchased Second Measure for an undisclosed amount. Second Measure had previously raised a total of $25 million dollars in two rounds of financing.

DeepMind researchers claim neural networks can outperform neursymbolic models

Neurosymbolic models combine neural networks with symbolic reasoning algorithms. An example of a neurosymbolic model is NS-DR which uses a neural network “perceptual” front-end and a hand-coded symbolic system for outputting answers.

Neural networks have been seen as lacking in the video question-answering space compared to neurosymbolic models, especially when it comes to answering questions around prediction, explanation or counterfactuals (consider counterfactual possibilities).

Researchers at DeepMind have now released a preprint paper that describes a neural network architecture that outperforms neurosymbolic models in the video question-answering space.

The researchers are utilizing CLEVERER, a dataset that contains over 20,000 5 second videos of colliding objects (three shapes of two materials and eight colors) that are generated by a physics engine. The dataset then contains over 300,000 questions and answers that are focused on elements of logical reasoning on the collisions. There are descriptive questions ( what color were the shapes), explanatory questions ( what caused the collision), predictive questions ( what will happen next) and counterfactual questions ( what if something else happened).

According to the DeepMind paper, their neural network equaled the performance of the best neurosymbolic models without pretraining or labeled data and with 40% less training data. It also scored 60% on the hardest counterfactual questions which was far better than the other models.

These results are quite significant since they add to a body of evidence that deep networks can replicate many properties of human cognition and reasoning.

Interview Question

You are given a string as input.

Write a function that checks if the letters in the string can be rearranged to form a palindrome ( or if the input is already a palindrome).

You can ignore spaces in the string.

Example

Input - “car race”

Output - True (the letters can be rearranged to “racecar”)

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

You are given two strings as input.

Write a function to find out if these two strings are at most one edit away from each other.

An edit is defined as either

  • inserting a character

  • removing a character

  • replacing a character

Input - "whale", "wrale" Output - True Input - "rake", "care" Output - False Input - "rake", "rake" Output - True

Solution

We can first check the lengths of the two strings. If the lengths differ by more than 1, we can immediately return False since we can insert 1 character at most.

Then, we iterate through both strings and compare them character by character.

  • If the characters are the same, continue on to the next character for both strings

  • Otherwise, if the characters are different and we haven’t made an edit yet then

    • if the lengths are the same we should try replacing the character at string A with the character at String B

    • Otherwise, if the lengths are different then we should try deleting one character from the longer string

  • Otherwise, if the characters are different and we HAVE made an edit then we can just return False.