☕ LinkedIn Bets Big

LinkedIn enters a new market. Plus, an answer to yesterday's Google Interview question. Monoliths vs. Microservices? What about the gray area in between?

Hey Guys,

Hope you’re all having a fantastic day!

Here’s your Industry News, Tech Snippets and Interview Problems!

As always, feel free to reply to this email with any questions, comments or insults.

I’m all ears!

Industry News

LinkedIn Bets on Gig Marketplaces

Fiverr and Upwork have been growing incredibly quickly. Fiverr posted 77% growth for 2020 and Upwork grew their revenue by 20% over the first three quarters of 2020.

LinkedIn, the largest professional social network out there (740 million users), has mainly been on the sidelines so far. That’s now changing…

According to The Information, LinkedIn is developing a new service called Marketplaces to rival Upwork and Fiverr.

This marketplace has been in development since September of 2019, when LinkedIn acquired UpCounsel (a marketplace for freelance lawyers).

UpCounsel’s founder, Matt Faustman, is now leading the Marketplaces product and working adapting it for all of LinkedIn’s users.

LinkedIn wants to enable onsite payments (allowing freelancers and clients to transact on the platform) and allow users to modify their LinkedIn profiles to display that they’re open for freelancing (along with additional discovery tools).

LinkedIn sees some of the most popular knowledge work being done in areas like Software Engineering, Design, Marketing and Executive Coaching.

10 Years of Open Source Visualization

Mike Bostock is the creator of D3.js, an incredibly popular JavaScript library for data visualization. The library creates SVG objects that you can embed in your website.

He wrote an outstanding essay on what he’s learned from 10 years of development for D3.js. Here’s quick summary of his takeaways.

  1. Teaching is the most impactful aspect of tool building.

  2. Beware bells and whistles: interaction, animation, and other technical whizbangery have a cost.

  3. Working with data should be 80% of the work of visualization

  4. Don’t commit to a specific visual form before seeing your data in it.

  5. 10% of code causes 90% of bugs.

Tech Snippets

  • TypeScript 4.2 has been announced! Features include

    • Smarter Type Alias Preservation - Type Alias allows you to declare a new name for a group of types ( Ex. BasicPrimitive that encompasses a number, string and boolean). Internals around how this works are smarter with TypeScript 4.2.

    • Better Tuple Types - When working with tuples, you have “Rest” elements which signal that you can have zero or more elements in your tuple. Previously, you could only add “Rest” elements to the end of your Tuple types. TypeScript 4.2 allows for leading and middle Rest elements.

    • Explain Files - A question that comes up for TypeScript users is asking “why is TypeScript including this file?”. Therefore, TypeScript 4.2 now provides a —explainFiles flag that provides some context on why certain files are being included.

  • An interesting blog post on how you should think about the tradeoffs between a Monolithic architecture vs. a Microservices Architecture and about the vast amount of gray area in between the two (that usually gets overlooked).

Interview Question

You are given a sorted array nums.

Write a function that removes any duplicates in nums in-place.

You must do this using O(1) space, you cannot allocate extra space for another array.

Previous Solution

As a refresher, here’s the last question

Given two strings s and t, return the number of distinct subsequences of s which equal t.

A subsequence is a new string formed from the original string by deleting some (or none) of the characters without changing the remaining character’s relative positions.

Example

Input - s = “babgbag”, t = “bag”

Output - 5

Solution

This is a classic Dynamic Programming question. Therefore, we can solve this efficiently with Bottom-Up DP.

We’ll create a memo table called cur to keep track of the indices where subsequences of s match with t.

Then, we’ll iterate through s and for each iteration of s, we’ll iterate through t.

Inside the nested loop, we’ll check if the respective characters in s and t match up. If so, we’ll check the previous spot in our memo table to see how many matching subsequences we have so far.

Then, we’ll add that number to the current spot in our memo table (since the current characters are matching).

At the end, we can check the final number in our memo table to see the total number of distinct subsequences in s which equal t.

Can you analyze the time/space complexity of our solution?

Reply back with your estimate!

We’ll tell you if you’re correct (or we’ll tell you the answer if you’re wrong).