{"id":2027,"date":"2010-08-09T15:11:55","date_gmt":"2010-08-10T01:11:55","guid":{"rendered":"http:\/\/simplify-your-life.com\/blog\/?p=2027"},"modified":"2010-08-10T03:34:42","modified_gmt":"2010-08-10T13:34:42","slug":"youtube-2","status":"publish","type":"post","link":"http:\/\/simplify-your-life.com\/blog\/?p=2027","title":{"rendered":"Youtube"},"content":{"rendered":"<p>No, the interview did not go well.<br \/>\nThe first question was: You have an unsorted array of continuous integers and one is missing &#8211; find it. I suggested sorting, that would have worked but was not the solution he wanted, then I suggested a binary map, but that was not the most elegant solution either. With a little help something like o over n or so I determined the min, max, added them up and called a virtual function expectedSum and figured it out.<br \/>\nThe next one was worse. Write a C++ function that gets an integer argument and outputs a string hex representation of that number. No functioncalls.  Oh, and less than 10 lines.  I understood the question. And I wish when I sit in meditation my mind could be as blank as it was when I should have answered. I sputtered masking and bitshifting and xor but did not write a single line.<br \/>\nIt was over right then. The SQL question was a nested query, and I did not recover until the shell script questions.<br \/>\nWhat does the $ sign mean in a bash script &#8230; if it is undefined what happens&#8230;  what does if [ $? -eq 0 ] mean&#8230; and a few more, I got these right. Took over an hour, and I am glad it is over&#8230;  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>No, the interview did not go well. The first question was: You have an unsorted array of continuous integers and one is missing &#8211; find it. I suggested sorting, that would have worked but was not the solution he wanted,&#8230;<\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027"}],"collection":[{"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2027"}],"version-history":[{"count":2,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions"}],"predecessor-version":[{"id":2029,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions\/2029"}],"wp:attachment":[{"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2027"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/simplify-your-life.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}