☕ Netflix CEO smacks down Work From Home
A new Microsoft Interview Question. Plus, Reed Hastings calls remote work a pure negative. Shopify is printing money and new details on Microsoft's next generation Xbox.
Hey Guys,
Hope you all had an awesome long weekend. Here’s your Interview Problem and Industry News for the day.
Interview Problem
Given a string, return the index of its first unique character. If a unique character does not exist, return -1
Examples
Input: “aa”
Output: -1
Input: “Interview”
Output: 1
Industry News
Reed Hastings calls Remote Work ‘a Pure Negative’ - Netflix is known for their unusual culture. It’s been described as extremely cutthroat, where Leaders practice the ‘keeper test’, in which they ask themselves: If a staffer were offered a job elsewhere, would you fight to keep that employee? If the answer is no, then the employee is let go. As for Work From Home, Hastings sees no positives. His prediction for the future of WFH is that the five-day workweek will become four days in the office and one day working remote. He plans on having Netflix return to the office within six months after a vaccine is approved.
Shopify is now worth $117 billion dollars - E-Commerce has been exploding since the pandemic with U.S. E-commerce sales surging 37% in the second quarter. One of the biggest winners from this is Shopify, a company that has built a platform to make it easier for retail merchants to sell their goods online. Shopify’s new market cap makes it larger than eBay, Etsy, Best Buy, Gap, Nordstrom, and Kohl’s combined.
Microsoft will release the next-gen Xbox consoles on November 10th, 2020 - The Xbox Series S is the entry-level console, and will cost $299 at retail. It will be (roughly) as powerful as the last gen Xbox One X. The Series X will cost $499. It boasts 4k resolution as 60 Frames Per Second as standard, with some games going all the way up to 120 FPS.
Previous Solution
As a refresher, here’s the last question
Given an n-ary tree, return the level order traversal of it’s nodes values.
Solution
A level-order tree traversal is a breadth-first traversal on a tree. Since we’re doing BFS, the key data structure we’ll need is a queue.
We’ll start with adding the root node to the queue.
Then, while the queue is not empty….
We take the length of the queue and store it as length
We’ll then deque from the queue length times.
On each deque, we’ll add the children of the deque’d node to the queue and add the value of the node to an array that keeps track of the values in the current level
After we do length deque’s, we can add the array (that keeps track of the current level) to an array that keeps track of the level-order traversal.
Then, we clear out our current level array and continue go to step 1
When the queue is empty, we can finally return out level-order traversal array as the final answer.