AMD overtakes Intel?

Google and Snap plan on investing $100 million dollars in an Indian startup. AMD overtakes Intel in a certain market for the first time in over 15 years.

Hi Everyone!

Happy New Year!

Tech Dive

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

Tech Snippets

Interview Question

You are given an array of k linked lists.

Each list is sorted in ascending order.

Merge all the linked lists into one sorted linked list and return it.

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 an unsorted linked list as input. Write a function that removes duplicate items.

Input - 1 -> 2 -> 1 -> 5 -> 2 -> None

Output - 1 -> 2-> 5 -> None

Solution

We can solve this question by using a set.

We traverse the linked list and check if the next node’s value is inside the set.

If it is, then we modify the current node’s next value to cur.next.next ( delete the next node).

Otherwise, we add cur.next’s value to the set and continue traversing the linked list.