{"id":15,"date":"2022-01-20T04:49:05","date_gmt":"2022-01-20T04:49:05","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/?p=15"},"modified":"2022-01-20T04:49:05","modified_gmt":"2022-01-20T04:49:05","slug":"meta-onsites","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/2022\/01\/20\/meta-onsites\/","title":{"rendered":"Meta Onsites!!"},"content":{"rendered":"\n<p>Somehow, despite failing to answer either of the Meta phone screen&#8217;s 2nd questions; I&#8217;ve been able to successfully make it through and get onto the onsites! Took this interview yesterday, and got word I am moving on!<\/p>\n\n\n\n<p>The leetcode struggle never ends!<\/p>\n\n\n\n<p>1st question I got &#8211; fucking easy; retrieve the maximum value at each level of a binary tree. Either do a DFS or a BFS, and store the values in a dictionary and compare them to the value at the level. OR do a DFS and simply store in an array with some variable that tracks the level you&#8217;re at and what levels were previously looked at. This one is cake &#8211; only thing I got mixed up on here, was not asking if negative values would be present in the binary tree; which was simply fixed up by updating my .get() method to have a -infinity value instead of -1.<\/p>\n\n\n\n<p>2nd question, disgusting &#8211; not on Leetcode FB tagged top 50 or top 100; it was one the interviewer chose themselves; imagine you&#8217;re receiving a constant stream of characters, as you receive them; determine how you&#8217;d print a specific list of words when they pop up!  i.e. if opabobafett was part of our stream; and the words we&#8217;d want to print out are in the list [opa, boba, bobafett], print those specific words out. As we can see in the example stream, there are overlapping characters, so&#8230;.  it makes it a little complex. I didn&#8217;t get to code this one out AT ALL, I simply described my thought process and how I&#8217;d even go abotu doing it. Luckily, I know of tries! So I said each word should be stored within a TrieNode, and the end of the word should be identified in some manner. To determine that the word is ready to be printed, we store a list of pointers. Each character that we receive, we check if it&#8217;s in the root TrieNode, and if any of the pointers in our list can be moved forward. We remove each pointer as we print it out, so we don&#8217;t constantly waste storage! Luckily the interviewer was convinced enough, although tbh I barely know the implementation of a Trie!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Onwards to the next 3-4 rounds! These are not my only interviews, anymore.. but.. still my most desired! Amazon, Microsoft, Zoom, anywhere, take me in!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Somehow, despite failing to answer either of the Meta phone screen&#8217;s 2nd questions; I&#8217;ve been able to successfully make it through and get onto the onsites! Took this interview yesterday, and got word I am moving on! The leetcode struggle &hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/freddyhoang\/2022\/01\/20\/meta-onsites\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":11934,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/users\/11934"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":16,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/posts\/15\/revisions\/16"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/freddyhoang\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}