{"id":548,"date":"2009-04-09T17:11:52","date_gmt":"2009-04-10T01:11:52","guid":{"rendered":"http:\/\/www.codebelay.com\/blog\/?p=548"},"modified":"2009-04-09T17:11:52","modified_gmt":"2009-04-10T01:11:52","slug":"my-favorite-coder-interview-question","status":"publish","type":"post","link":"https:\/\/www.codebelay.com\/blog\/2009\/04\/09\/my-favorite-coder-interview-question\/","title":{"rendered":"My Favorite Coder Interview Question"},"content":{"rendered":"<p>What is your favorite algorithm?<\/p>\n<p>My favorite algorithm right now is the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Mergesort\">merge sort<\/a>.<\/p>\n<figure id=\"attachment_549\" aria-describedby=\"caption-attachment-549\" style=\"width: 280px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.codebelay.com\/blog\/wp-content\/uploads\/2009\/04\/merge_sort_animation2.gif\" alt=\"v1: Nuno Nogueira (Nmnogueira), v2: edited by Daniel Miller (cobaltBlue)\" title=\"merge_sort_animation2\" width=\"280\" height=\"237\" class=\"size-full wp-image-549\" \/><figcaption id=\"caption-attachment-549\" class=\"wp-caption-text\">v1: Nuno Nogueira (Nmnogueira), v2: edited by Daniel Miller (cobaltBlue)<\/figcaption><\/figure>\n<p>I like it so much that I&#8217;ve implemented it in <a href=\"http:\/\/www.codebelay.com\/algorithms\/sorting\/MergeSort.phps\">PHP<\/a> and <a href=\"http:\/\/www.codebelay.com\/rb\/trunk\/mergesort.rb\">Ruby<\/a>.<\/p>\n<p>The problem is that as a web developer I&#8217;ve never had to use a merge sort. Back in the old days when pagination was tricky, I&#8217;ve had to use a linked list, but you really don&#8217;t have to use the merge sort anymore.<\/p>\n<p>So at this point it&#8217;s really just academic.<\/p>\n<p>What interview question should really count now?<\/p>\n<p>More on that in my next post. As a clue, I&#8217;d like to say it has to do with Leibniz&#8217;s statement, &#8220;The present is big with the future.&#8221; A techie who believes that and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Principle_of_sufficient_reason\">the principle of sufficient reason<\/a> is the kind of techie you want.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is your favorite algorithm? My favorite algorithm right now is the merge sort. I like it so much that I&#8217;ve implemented it in PHP and Ruby. The problem is that as a web developer I&#8217;ve never had to use a merge sort. Back in the old days when pagination was tricky, I&#8217;ve had to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56,131,108,5,33],"tags":[179,295,297,182,298,296,299],"class_list":["post-548","post","type-post","status-publish","format-standard","hentry","category-php","category-questions","category-ruby","category-techbiz","category-webapps","tag-hr","tag-interview-questions","tag-interviewing","tag-jobs","tag-leibniz","tag-mergesort","tag-principle-of-sufficient-reason"],"_links":{"self":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/comments?post=548"}],"version-history":[{"count":0,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/548\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/media?parent=548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/categories?post=548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/tags?post=548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}