{"id":13092,"date":"2020-05-22T17:42:21","date_gmt":"2020-05-22T17:42:21","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=13092"},"modified":"2020-05-22T17:42:21","modified_gmt":"2020-05-22T17:42:21","slug":"theexceptioncat-i-recognize-i-do-use-space-but-its-a-single-pass-and-on-on-run-time-is-pretty-decent-better-than-onlogn-for-sure-on-is-really-o%c2%bdn-on-average-but-you-round","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=13092","title":{"rendered":"@theexceptioncat I recognize I do use space: but it&#8217;s a single pass &#8230; and O(n) on run time is pretty decent &#8211; better than O(NlogN), for sure O(N) is *really* O(\u00bdN), on average &#8211; but you round to O(N) if the data&#8217;s sorted, you can get O(log2(N)) :: binary search + comparing \u00b11 element"},"content":{"rendered":"<blockquote class=\"twitter-tweet\">\n<p lang=\"en\" dir=\"ltr\">I recognize I do use space: but it&#39;s a single pass &#8230; and O(n) on run time is pretty decent &#8211; better than O(NlogN), for sure<\/p>\n<p>O(N) is *really* O(\u00bdN), on average &#8211; but you round to O(N)<\/p>\n<p>if the data&#39;s sorted, you can get O(log2(N)) :: binary search + comparing \u00b11 element<\/p>\n<p>&mdash; Warren Myers ?? (@warrenmyers) <a href=\"https:\/\/twitter.com\/warrenmyers\/status\/1263884402519670785?ref_src=twsrc%5Etfw\">May 22, 2020<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><br \/>\n<br \/>\nfrom Twitter https:\/\/twitter.com\/warrenmyers<\/p>\n<p>May 22, 2020 at 01:28PM<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recognize I do use space: but it&#39;s a single pass &#8230; and O(n) on run time is pretty decent &#8211; better than O(NlogN), for sure O(N) is *really* O(\u00bdN), on average &#8211; but you round to O(N) if the data&#39;s sorted, you can get O(log2(N)) :: binary search + comparing \u00b11 element &mdash; Warren &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=13092\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">@theexceptioncat I recognize I do use space: but it&#8217;s a single pass &#8230; and O(n) on run time is pretty decent &#8211; better than O(NlogN), for sure O(N) is *really* O(\u00bdN), on average &#8211; but you round to O(N) if the data&#8217;s sorted, you can get O(log2(N)) :: binary search + comparing \u00b11 element<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[792],"keyring_services":[],"class_list":["post-13092","post","type-post","status-publish","format-standard","hentry","category-blih","tag-twitter"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/13092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13092"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/13092\/revisions"}],"predecessor-version":[{"id":13093,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/13092\/revisions\/13093"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13092"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=13092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}