{"id":1330,"date":"2025-10-25T15:29:20","date_gmt":"2025-10-25T06:29:20","guid":{"rendered":"https:\/\/blog.dozzing.kr\/?p=1330"},"modified":"2026-03-17T15:10:40","modified_gmt":"2026-03-17T06:10:40","slug":"coding-test-1%ec%b0%a8-%ec%ba%90%ec%8b%9c-%e2%ad%90%e2%ad%90","status":"publish","type":"post","link":"https:\/\/blog.dozzing.kr\/?p=1330","title":{"rendered":"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50"},"content":{"rendered":"<p><dodo>\ud83d\udc33<strong><yy><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/school.programmers.co.kr\/learn\/courses\/30\/lessons\/17680\">2018 KAKAO BLIND RECRUITMENT [1\ucc28] \uce90\uc2dc \u2b50\u2b50<\/a><\/yy><\/strong> \ucf54\ub529 \ud14c\uc2a4\ud2b8 \ubb38\uc81c\ub97c \ud480\uace0 \uc815\ub9ac\ud55c \uae00\uc785\ub2c8\ub2e4 \ud83d\udc33<\/dodo><\/p>\n<h2>\ud83d\udcab \ubb38\uc81c \uc124\uba85<\/h2>\n<h3>\ub9e4\uac1c\ubcc0\uc218<\/h3>\n<ul>\n<li><code>cacheSize<\/code>: \uce90\uc2dc \ud06c\uae30\n<ul>\n<li>\uc815\uc218<\/li>\n<li>0 \u2266\u00a0<code>cacheSize<\/code>\u00a0\u2266 30<\/li>\n<\/ul>\n<\/li>\n<li><code>cities<\/code>: \ub3c4\uc2dc \uc774\ub984 \ubb38\uc790\uc5f4 \ubc30\uc5f4\n<ul>\n<li>\ucd5c\ub300 \ub3c4\uc2dc \uc218 100,000\uac1c<\/li>\n<li>\uac01 \ub3c4\uc2dc \uc774\ub984\uc740 \uacf5\ubc31, \uc22b\uc790, \ud2b9\uc218\ubb38\uc790 \ub4f1\uc774 \uc5c6\ub294 \uc601\ubb38\uc790\ub85c \uad6c\uc131\n<ul>\n<li><strong>\ub300\uc18c\ubb38\uc790 \uad6c\ubd84 X<\/strong><\/li>\n<li>\ub3c4\uc2dc \uc774\ub984\uc740 \ucd5c\ub300 20\uc790<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\uc870\uac74<\/h3>\n<ul>\n<li><strong>\uce90\uc2dc \uad50\uccb4 \uc54c\uace0\ub9ac\uc998\uc740\u00a0<code>LRU<\/code>(Least Recently Used)\ub97c \uc0ac\uc6a9<\/strong>\ud55c\ub2e4.<\/li>\n<li><code>cache hit<\/code>\uc77c \uacbd\uc6b0 \uc2e4\ud589\uc2dc\uac04\uc740\u00a0<code>1<\/code>\uc774\ub2e4.<\/li>\n<li><code>cache miss<\/code>\uc77c \uacbd\uc6b0 \uc2e4\ud589\uc2dc\uac04\uc740\u00a0<code>5<\/code>\uc774\ub2e4.<\/li>\n<\/ul>\n<p>\u2192 \uc785\ub825\ub41c \ub3c4\uc2dc\uc774\ub984 \ubc30\uc5f4\uc744 \uc21c\uc11c\ub300\ub85c \ucc98\ub9ac\ud560 \ub54c, <strong>\ucd1d \uc2e4\ud589\uc2dc\uac04<\/strong>\uc744 \ucd9c\ub825<\/p>\n<hr \/>\n<h2>\ud83d\udcab \ucf54\ub4dc<\/h2>\n<pre><code class=\"language-python line-numbers\">def solution(cacheSize, cities):\n    cities = [citi.upper() for citi in cities]\n    arr = []\n    time = 0\n\n    if cacheSize == 0:\n        return len(cities) * 5\n    else:\n        for citi in cities:\n            if citi in arr:\n                arr.pop(arr.index(citi))\n                arr.append(citi)\n                time += 1\n            else:\n                if len(arr) &gt;= cacheSize:\n                    arr.pop(0)\n                arr.append(citi)\n                time += 5\n\n    return time\n<\/code><\/pre>\n<h2>\ud83d\udcab Least Recently Used (LRU)\ub780?<\/h2>\n<h5><code>LRU(Least Recently Used)<\/code>\ub294 <strong>\uac00\uc7a5 \uc624\ub7ab\ub3d9\uc548 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc740 \ub370\uc774\ud130<\/strong>\ub97c \uc6b0\uc120\uc801\uc73c\ub85c \uc81c\uac70\ud558\ub294 \uce90\uc2f1 \uc54c\uace0\ub9ac\uc998\uc774\ub2e4.<\/h5>\n<h5>\u2192 \ucd5c\uadfc\uc5d0 \uc790\uc8fc \uc811\uadfc\ub41c \ub370\uc774\ud130\ub294 \uce90\uc2dc\uc5d0 \ub0a8\uae30\uace0, <strong>\uc624\ub798 \ubc29\uce58\ub41c \ub370\uc774\ud130\ubd80\ud130 \uc81c\uac70<\/strong>\ud558\uc5ec \uce90\uc2dc \uacf5\uac04\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \uc0ac\uc6a9<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc332018 KAKAO BLIND RECRUITMENT [1\ucc28] \uce90\uc2dc \u2b50\u2b50 \ucf54\ub529 \ud14c\uc2a4\ud2b8 \ubb38\uc81c\ub97c \ud480\uace0 \uc815\ub9ac\ud55c \uae00\uc785\ub2c8\ub2e4 \ud83d\udc33 \ud83d\udcab \ubb38\uc81c \uc124\uba85 \ub9e4\uac1c\ubcc0\uc218 cacheSize: \uce90\uc2dc \ud06c\uae30 \uc815\uc218 0 \u2266\u00a0cacheSize\u00a0\u2266 30 cities: \ub3c4\uc2dc \uc774\ub984 \ubb38\uc790\uc5f4 \ubc30\uc5f4 \ucd5c\ub300 \ub3c4\uc2dc \uc218 100,000\uac1c \uac01 \ub3c4\uc2dc \uc774\ub984\uc740 \uacf5\ubc31, \uc22b\uc790, \ud2b9\uc218\ubb38\uc790 \ub4f1\uc774 \uc5c6\ub294 \uc601\ubb38\uc790\ub85c \uad6c\uc131 \ub300\uc18c\ubb38\uc790 \uad6c\ubd84 X \ub3c4\uc2dc \uc774\ub984\uc740 \ucd5c\ub300 20\uc790 \uc870\uac74 \uce90\uc2dc \uad50\uccb4 \uc54c\uace0\ub9ac\uc998\uc740\u00a0LRU(Least [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,60],"tags":[27,69,11,42,10],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-coding-test","category-programmers","tag-27","tag-coding-test","tag-programmers","tag-python","tag-10"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.dozzing.kr\/?p=1330\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World\" \/>\n<meta property=\"og:description\" content=\"\ud83d\udc332018 KAKAO BLIND RECRUITMENT [1\ucc28] \uce90\uc2dc \u2b50\u2b50 \ucf54\ub529 \ud14c\uc2a4\ud2b8 \ubb38\uc81c\ub97c \ud480\uace0 \uc815\ub9ac\ud55c \uae00\uc785\ub2c8\ub2e4 \ud83d\udc33 \ud83d\udcab \ubb38\uc81c \uc124\uba85 \ub9e4\uac1c\ubcc0\uc218 cacheSize: \uce90\uc2dc \ud06c\uae30 \uc815\uc218 0 \u2266\u00a0cacheSize\u00a0\u2266 30 cities: \ub3c4\uc2dc \uc774\ub984 \ubb38\uc790\uc5f4 \ubc30\uc5f4 \ucd5c\ub300 \ub3c4\uc2dc \uc218 100,000\uac1c \uac01 \ub3c4\uc2dc \uc774\ub984\uc740 \uacf5\ubc31, \uc22b\uc790, \ud2b9\uc218\ubb38\uc790 \ub4f1\uc774 \uc5c6\ub294 \uc601\ubb38\uc790\ub85c \uad6c\uc131 \ub300\uc18c\ubb38\uc790 \uad6c\ubd84 X \ub3c4\uc2dc \uc774\ub984\uc740 \ucd5c\ub300 20\uc790 \uc870\uac74 \uce90\uc2dc \uad50\uccb4 \uc54c\uace0\ub9ac\uc998\uc740\u00a0LRU(Least [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.dozzing.kr\/?p=1330\" \/>\n<meta property=\"og:site_name\" content=\"Dozzing World\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-25T06:29:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-17T06:10:40+00:00\" \/>\n<meta name=\"author\" content=\"Dozzing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dozzing\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1330\",\"url\":\"https:\/\/blog.dozzing.kr\/?p=1330\",\"name\":\"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World\",\"isPartOf\":{\"@id\":\"https:\/\/blog.dozzing.kr\/#website\"},\"datePublished\":\"2025-10-25T06:29:20+00:00\",\"dateModified\":\"2026-03-17T06:10:40+00:00\",\"author\":{\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1330#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.dozzing.kr\/?p=1330\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1330#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.dozzing.kr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.dozzing.kr\/#website\",\"url\":\"https:\/\/blog.dozzing.kr\/\",\"name\":\"Dozzing World\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.dozzing.kr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f\",\"name\":\"Dozzing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g\",\"caption\":\"Dozzing\"},\"sameAs\":[\"https:\/\/blog.dozzing.kr\/\"],\"url\":\"https:\/\/blog.dozzing.kr\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.dozzing.kr\/?p=1330","og_locale":"ko_KR","og_type":"article","og_title":"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World","og_description":"\ud83d\udc332018 KAKAO BLIND RECRUITMENT [1\ucc28] \uce90\uc2dc \u2b50\u2b50 \ucf54\ub529 \ud14c\uc2a4\ud2b8 \ubb38\uc81c\ub97c \ud480\uace0 \uc815\ub9ac\ud55c \uae00\uc785\ub2c8\ub2e4 \ud83d\udc33 \ud83d\udcab \ubb38\uc81c \uc124\uba85 \ub9e4\uac1c\ubcc0\uc218 cacheSize: \uce90\uc2dc \ud06c\uae30 \uc815\uc218 0 \u2266\u00a0cacheSize\u00a0\u2266 30 cities: \ub3c4\uc2dc \uc774\ub984 \ubb38\uc790\uc5f4 \ubc30\uc5f4 \ucd5c\ub300 \ub3c4\uc2dc \uc218 100,000\uac1c \uac01 \ub3c4\uc2dc \uc774\ub984\uc740 \uacf5\ubc31, \uc22b\uc790, \ud2b9\uc218\ubb38\uc790 \ub4f1\uc774 \uc5c6\ub294 \uc601\ubb38\uc790\ub85c \uad6c\uc131 \ub300\uc18c\ubb38\uc790 \uad6c\ubd84 X \ub3c4\uc2dc \uc774\ub984\uc740 \ucd5c\ub300 20\uc790 \uc870\uac74 \uce90\uc2dc \uad50\uccb4 \uc54c\uace0\ub9ac\uc998\uc740\u00a0LRU(Least [&hellip;]","og_url":"https:\/\/blog.dozzing.kr\/?p=1330","og_site_name":"Dozzing World","article_published_time":"2025-10-25T06:29:20+00:00","article_modified_time":"2026-03-17T06:10:40+00:00","author":"Dozzing","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"Dozzing"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.dozzing.kr\/?p=1330","url":"https:\/\/blog.dozzing.kr\/?p=1330","name":"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50 - Dozzing World","isPartOf":{"@id":"https:\/\/blog.dozzing.kr\/#website"},"datePublished":"2025-10-25T06:29:20+00:00","dateModified":"2026-03-17T06:10:40+00:00","author":{"@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f"},"breadcrumb":{"@id":"https:\/\/blog.dozzing.kr\/?p=1330#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.dozzing.kr\/?p=1330"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.dozzing.kr\/?p=1330#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.dozzing.kr\/"},{"@type":"ListItem","position":2,"name":"[Coding Test] [1\ucc28] \uce90\uc2dc \u2b50\u2b50"}]},{"@type":"WebSite","@id":"https:\/\/blog.dozzing.kr\/#website","url":"https:\/\/blog.dozzing.kr\/","name":"Dozzing World","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.dozzing.kr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f","name":"Dozzing","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g","caption":"Dozzing"},"sameAs":["https:\/\/blog.dozzing.kr\/"],"url":"https:\/\/blog.dozzing.kr\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1330"}],"version-history":[{"count":6,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1330\/revisions"}],"predecessor-version":[{"id":1336,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1330\/revisions\/1336"}],"wp:attachment":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}