☕ India's Newest Unicorn

A Google Interview Question. India's newest company to break the billion dollar valuation (hint hint, it's in the fintech space). Facebook creates a new loyalty program for white hat hackers.

Hey,

Hope you’re having an awesome day!

On to the Interview Problem and Industry News!

Interview Problem

Given two integers n and k, return all possible combinations of k numbers out of 1 to n inclusive.

You can return the answer in any order!

Input - n = 4, k = 3

Output - [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]

We’ll send out the 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

India’s Razorpay becomes a Unicorn after a new $100 million dollar funding round

Razorpay is a 6 year old tech startup that accepts, processes and disburses online payments for small businesses and enterprises. They also have banking services such as loans to small businesses and corporate credit cards. They’re part of the growing “neobank” trend, banks that are internet-only. They save money by not offering physical branches and pass the savings on to the customer.

The company has been immensely successful and will process 25 billion dollars in transactions this year, serving more than 10 million customers. Some of the growth has been due to the coronavirus pandemic, which has accelerated digital adoption among many businesses.

Razorpay has raised their Series D round, which was led by GIC (Singapore’s Sovereign Wealth Fund) and Sequoia India. The company raised $100 million dollars at a valuation that was a bit over $1 billion dollars, making it India’s newest Unicorn.

Facebook introduces Hacker Plus, a loyalty program for White Hack hackers offering bonuses, all-expense paid trips and early access to stress-test new products

Many big tech companies rely heavily on bug bounty programs to fix security vulnerabilities. Google paid out $6.5 million dollars in bug bounties last year and $21 million dollars since 2010. Facebook has paid out nearly $10 million dollars since the launch of their bug bounty program in 2011.

To incentivize more security researchers to penetration test Facebook’s products, Facebook has introduced Hacker Plus, a program that offers performance based rewards such as cash bonuses, all-expense paid trips and early access to stress-test new products and features.

Facebook is gamifying Hacker Plus by adopting a league-like setup with a ranking system. White hack hackers are automatically placed into leagues based on the quality and quantity of their bug submissions over the past 24 months and people get different perks based on their league. People in the entry-level bronze league get a 5% cash bonus on top of each bounty award while researchers in the DIamond league can get 20% cash bonuses and paid trips to live hacking events.

This could mean fun times for white hat hackers if more tech companies adopt similar programs!

Previous Solution

As a refresher, here’s the previous question

You are given a list of integers as input.

This list represents the preorder traversal of a Binary Search Tree.

Using that list, reconstruct a Binary Search Tree with that preorder traversal and return the root node of the Tree.

Solution

Whenever you see Binary Trees in a question, your first instinct should be recursion. Can we use recursion to solve this question?

As a matter of fact, we can!

If you think about how a preorder traversal is constructed, the first value is always the value of the root node. Then, comes the preorder traversal of the left subtree, then the preorder traversal of the right subtree.

Therefore, we can take out the first node from our traversal and create our root node. Then, we split the remaining nodes into the left subtree traversal and the right subtree traversal. We know where the split occurs since all the nodes in the left subtree will be less than our root, while all the nodes in the right subtree will be greater than our root.

Then, we can just recursively call our bstFromPreorder function on the left and right subtree traversals.