<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>현실을 넘어</title>
    <link>https://oth3410.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Fri, 21 Aug 2026 02:02:20 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>OverTheHorizon3410</managingEditor>
    <item>
      <title>[블로그 이사] https://velog.io/@qkrtkdwns3410/posts</title>
      <link>https://oth3410.tistory.com/403</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #3a4954; text-align: start;&quot;&gt;&lt;a href=&quot;https://velog.io/@qkrtkdwns3410/posts&quot;&gt;https://velog.io/@qkrtkdwns3410/posts&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>리눅스</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/403</guid>
      <comments>https://oth3410.tistory.com/403#entry403comment</comments>
      <pubDate>Fri, 15 Mar 2024 00:37:55 +0900</pubDate>
    </item>
    <item>
      <title>ㅇ</title>
      <link>https://oth3410.tistory.com/notice/402</link>
      <description></description>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/notice/402</guid>
      <pubDate>Tue, 5 Mar 2024 19:25:12 +0900</pubDate>
    </item>
    <item>
      <title># [전자정부프레임워크] 3.5 &amp;rarr; 4.0 마이그레이션 및 호환성 인증</title>
      <link>https://oth3410.tistory.com/401</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://velog.io/@qkrtkdwns3410/%EC%A0%84%EC%9E%90%EC%A0%95%EB%B6%80%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC-3.5-4.0-%EB%A7%88%EC%9D%B4%EA%B7%B8%EB%A0%88%EC%9D%B4%EC%85%98-%EB%B0%8F-%ED%98%B8%ED%99%98%EC%84%B1-%EC%9D%B8%EC%A6%9D&quot;&gt;[전자정부프레임워크] 3.5 &amp;rarr; 4.0 마이그레이션 및 호환성 인증 (velog.io)&lt;/a&gt;&lt;/p&gt;
&lt;figure id=&quot;og_1710254839360&quot; contenteditable=&quot;false&quot; data-ke-type=&quot;opengraph&quot; data-ke-align=&quot;alignCenter&quot; data-og-type=&quot;article&quot; data-og-title=&quot;[전자정부프레임워크] 3.5 &amp;rarr; 4.0 마이그레이션 및 호환성 인증&quot; data-og-description=&quot;회사에서 전자정부 프레임워크관련하여 마이그레이션 및 호환성 점검을 받은 내용을 기록한다.Spring MVC 와 Spring Boot 모두 마이그레이션을 수행하였습니다.회사마다 소스 형태가 다르기에, 다르&quot; data-og-host=&quot;velog.io&quot; data-og-source-url=&quot;https://velog.io/@qkrtkdwns3410/%EC%A0%84%EC%9E%90%EC%A0%95%EB%B6%80%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC-3.5-4.0-%EB%A7%88%EC%9D%B4%EA%B7%B8%EB%A0%88%EC%9D%B4%EC%85%98-%EB%B0%8F-%ED%98%B8%ED%99%98%EC%84%B1-%EC%9D%B8%EC%A6%9D&quot; data-og-url=&quot;https://velog.io/@qkrtkdwns3410/전자정부프레임워크-3.5-4.0-마이그레이션-및-호환성-인증&quot; data-og-image=&quot;https://scrap.kakaocdn.net/dn/6ozzH/hyVAMcIJ7V/BNVXsw3OqhrnABK0KQgLC0/img.png?width=991&amp;amp;height=270&amp;amp;face=0_0_991_270,https://scrap.kakaocdn.net/dn/cQAkkz/hyVxAZjLiY/5Uuk1aeW5QNMACIf97Ec7k/img.png?width=991&amp;amp;height=270&amp;amp;face=0_0_991_270&quot;&gt;&lt;a href=&quot;https://velog.io/@qkrtkdwns3410/%EC%A0%84%EC%9E%90%EC%A0%95%EB%B6%80%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC-3.5-4.0-%EB%A7%88%EC%9D%B4%EA%B7%B8%EB%A0%88%EC%9D%B4%EC%85%98-%EB%B0%8F-%ED%98%B8%ED%99%98%EC%84%B1-%EC%9D%B8%EC%A6%9D&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; data-source-url=&quot;https://velog.io/@qkrtkdwns3410/%EC%A0%84%EC%9E%90%EC%A0%95%EB%B6%80%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC-3.5-4.0-%EB%A7%88%EC%9D%B4%EA%B7%B8%EB%A0%88%EC%9D%B4%EC%85%98-%EB%B0%8F-%ED%98%B8%ED%99%98%EC%84%B1-%EC%9D%B8%EC%A6%9D&quot;&gt;
&lt;div class=&quot;og-image&quot; style=&quot;background-image: url('https://scrap.kakaocdn.net/dn/6ozzH/hyVAMcIJ7V/BNVXsw3OqhrnABK0KQgLC0/img.png?width=991&amp;amp;height=270&amp;amp;face=0_0_991_270,https://scrap.kakaocdn.net/dn/cQAkkz/hyVxAZjLiY/5Uuk1aeW5QNMACIf97Ec7k/img.png?width=991&amp;amp;height=270&amp;amp;face=0_0_991_270');&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;og-text&quot;&gt;
&lt;p class=&quot;og-title&quot; data-ke-size=&quot;size16&quot;&gt;[전자정부프레임워크] 3.5 &amp;rarr; 4.0 마이그레이션 및 호환성 인증&lt;/p&gt;
&lt;p class=&quot;og-desc&quot; data-ke-size=&quot;size16&quot;&gt;회사에서 전자정부 프레임워크관련하여 마이그레이션 및 호환성 점검을 받은 내용을 기록한다.Spring MVC 와 Spring Boot 모두 마이그레이션을 수행하였습니다.회사마다 소스 형태가 다르기에, 다르&lt;/p&gt;
&lt;p class=&quot;og-host&quot; data-ke-size=&quot;size16&quot;&gt;velog.io&lt;/p&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;여기 참고!&lt;/p&gt;</description>
      <category>일 관련 삽질</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/401</guid>
      <comments>https://oth3410.tistory.com/401#entry401comment</comments>
      <pubDate>Tue, 5 Mar 2024 15:58:20 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린 인 액션] 4.2.2 __부 생성자: 상위 클래스를 다른 방식으로 초기화__</title>
      <link>https://oth3410.tistory.com/400</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;b51cd2fa-9e7b-4ed0-a0b7-27801fc662e2&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;h2 class=&quot;&quot; id=&quot;1453b326-a140-4cab-be95-8c11ec302f34&quot;&gt;코틀린 생성자 vs 자바 생성자&lt;/h2&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;e6438e4d-56b1-45c8-be62-4e74cda0cb8d&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;코틀린은 자바에 비해 생성자가 여러 개 필요한 경우가 적다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;3b044b3d-b050-4789-a26a-cb8610db644a&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;자바에서 필요한 오버로드 생성자는 코틀린의 기본 생성자와 이름 붙인 인자 문법으로 해결이 가능하다.&lt;ul class=&quot;bulleted-list&quot; id=&quot;97482340-9fe4-4aea-9f58-06a9202f7ad4&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;&lt;code&gt;이름 붙인 인자&lt;/code&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;f95471c6-b53b-455d-9624-1e41d6ef25d8&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;함수나 생성자 호출시 파라미터의 이름을 명시적으로 지정하여 값을 전달하는 방식&lt;/li&gt;&lt;/ul&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;b575e67b-0e40-40cc-831f-510b38ed0717&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;fun formatMessage(name: String, age: Int, location: String) {
    // ...
}&lt;/code&gt;&lt;/pre&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;72ac28fb-6a5d-46cb-b1e2-14629af2cc05&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;을 호출시에&lt;/li&gt;&lt;/ul&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;8268e306-407a-4dc8-8e88-f8c91c52c310&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;formatMessage(location = &quot;Seoul&quot;, age = 30, name = &quot;Alice&quot;)
 혹은
formatMessage(name = &quot;Alice&quot;, age = 30, location = &quot;Seoul&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;3254ebe6-e981-417f-b879-decb63c88732&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;인자가 무엇을 의미하는지 명확하게 전달이 가능하다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&quot;&quot; id=&quot;5225000a-abe8-4965-bd28-6cacd63c3a80&quot;&gt;부 생성자가 필요한 경우&lt;/h2&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;03e6bd21-5a74-4dad-b4e8-9d0d00094f1e&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;프레임 워크 클래스를 확장하는 경우, 다양한 방법으로 인스턴스 초기화할 수 있어야 할때&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;c9dc17f5-7469-466a-8f35-26910f7efb25&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;예: 안드로이드의 &lt;code&gt;View&lt;/code&gt; 클래스&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&quot;&quot; id=&quot;ce6e90eb-eda5-448f-8015-805f26bc3eff&quot;&gt;예시&lt;/h2&gt;&lt;ol class=&quot;numbered-list&quot; id=&quot;d60d4a01-5dba-44d1-a4e4-4feeecb9f1bd&quot; start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;li&gt;View 클래스&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;8387d0da-7c52-46e5-9e29-ffdabfbc2cbc&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;open class View {
    constructor (ctx: Context) {
        // 코드
    }
    constructor (ctx: Context, attr: AttributeSet) {
        // 코드
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol class=&quot;numbered-list&quot; id=&quot;3ab1e9d8-81e1-485a-a40b-b07d3e065b14&quot; start=&quot;2&quot; type=&quot;1&quot;&gt;&lt;li&gt;MyButton 클래스&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;07871a2e-c2d7-4a31-a6f2-64833e33241e&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;class MyButton : View {
    constructor (ctx: Context) : super(ctx) {
        // ...
    }
    constructor (ctx: Context, attr: AttributeSet) : super(ctx, attr) {
        // ...
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 class=&quot;&quot; id=&quot;b5746511-84a9-4b99-9342-30f36076402e&quot;&gt;생성자 위임 방식&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;61922691-0b20-46c1-9a18-5b20a2e9e148&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;super() 를 통한 위임&lt;figure class=&quot;image&quot; id=&quot;8cf3aa82-86d9-43c0-8401-c82dbed21d53&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blog.kakaocdn.net/dn/dIMyRq/btsFuH7dxME/KxK5TvC2COVZhR80qBPsPK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dIMyRq/btsFuH7dxME/KxK5TvC2COVZhR80qBPsPK/img.png&quot; style=&quot;width:863px&quot;/&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;bede793d-e2ae-4085-bd39-9cb090859880&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;this() 를 사용해 클래스 자신의 다른 생성자를 호출할 수 있음&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;5670272a-70d4-4a5a-a84d-0c47ee6d68fc&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;`class MyButton : View {
    constructor (ctx: Context) : this(ctx,MY_STYLE) {
        // ...
    }
    constructor (ctx: Context, attr: AttributeSet) : super(ctx, attr) {
        // ...
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;figure class=&quot;image&quot; id=&quot;4ac85008-9870-4884-88ae-f0a971a36f22&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blog.kakaocdn.net/dn/buMHAX/btsFuNzBxsD/NRlKdJYM2kvulJrjWvFEP1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/buMHAX/btsFuNzBxsD/NRlKdJYM2kvulJrjWvFEP1/img.png&quot; style=&quot;width:793px&quot;/&gt;&lt;/a&gt;&lt;/figure&gt;&lt;p class=&quot;&quot; id=&quot;cc8f56da-2e32-410a-aa5c-ad510ef560e3&quot;&gt;
&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;5c97b3f6-1800-46d5-97fe-315446839253&quot;&gt;모든 부 생성자는 상위 클래스를 초기화하거나 다른 생성자에게 생성을 위임하는 역할을 해야합니다!&lt;/h3&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>코틀린/코틀린인액션</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/400</guid>
      <comments>https://oth3410.tistory.com/400#entry400comment</comments>
      <pubDate>Mon, 4 Mar 2024 15:18:50 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린 인 액션] 4.2.3 인터페이스에 선언된 프로퍼티 구현</title>
      <link>https://oth3410.tistory.com/399</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;7836e509-8885-4f6c-a3c6-767abb109f23&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;a5ec3c58-af25-4590-9338-a272d4a186cd&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;코틀린에서 인터페이스의 경우 추상 프로퍼티를 포함할 수 있다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;b062de0e-4bb9-4409-b42f-263fac406425&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;인터페이스를 구현하는 클래스가 해당 프로퍼티에 대한 구현을 제공해야 한다.&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;26f176f9-d179-4ea8-b360-f7bbb0e9bb53&quot;&gt;추상 프로퍼티 선언 예시&lt;/h3&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;16d07856-409c-467e-915c-c40f0a8d8c50&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;interface User {
    val nickname: String
}

//주 생성자에서 프로퍼티를 직접 선언한다.
class PrivateUser(override val nickname: String) : User {
    /*User 의 추상 프로퍼티를 override 키워드로 구현*/
}


// 커스텀 게터를 사용한다.
class SubscribingUser(val email: String) : User {
    /*이메일 주소에서 별명을 계산하여 반환하는 커스텀 게터 사용*/
    override val nickname: String
        get() = email.substringBefore('@')
}

// 초기화 식을 사용한다.
class FacebookUser(val accountId: Int) : User {
    //객체 초기화시 계산한 데이터를 저장하고, 이를 nickname 의 프로퍼티 값으로 사용
    override val nickname = getFacebookName(accountId)
}&lt;/code&gt;&lt;/pre&gt;&lt;h3 class=&quot;&quot; id=&quot;0d4227e1-dfba-46b5-ab6b-a86f0dbbf65c&quot;&gt;인터페이스에서 게터와 세터가 있는 프로퍼티 선언&lt;/h3&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;6631f77a-98a4-4003-afbe-f44a51ceb0aa&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;interface User {
    val email: String
    val nickname: String
        get() = email.substringBefore('@')
}
&lt;/code&gt;&lt;/pre&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;b0f46500-ba47-4283-b6bb-d1a01db10267&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;email은 추상 프로퍼티로 하위 클래스에서 반드시 구현해야 합니다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;dcc3fec5-9bb1-4568-86c3-e3cb64502232&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;nickname은 커스텀 게터를 사용하여 구현되며, 하위 클래스에서 오버라이드하지 않고 상속할 수 있습니다.&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;7b03cc79-1125-46af-a129-6dfe912ad973&quot;&gt;클래스에서 구현된 프로퍼티와 접근자&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;84d1517e-aa8d-405c-83d1-ff6b5f364ba0&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;클래스에서 구현된 프로퍼티는 뒷받침하는 필드를 원하는 대로 사용 가능.&lt;/li&gt;&lt;/ul&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>코틀린/코틀린인액션</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/399</guid>
      <comments>https://oth3410.tistory.com/399#entry399comment</comments>
      <pubDate>Mon, 4 Mar 2024 15:18:39 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린] 11727 __2&amp;times;n 타일링 2__</title>
      <link>https://oth3410.tistory.com/398</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;f11dcd62-a45b-4dff-aa9e-c50e1f305d95&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;figure class=&quot;image&quot; id=&quot;c4fe350d-9324-4c71-b986-2db47c18d142&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blog.kakaocdn.net/dn/cvzPRW/btsFn9jE83r/RVllrTAVGfCCyuW603AS8K/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cvzPRW/btsFn9jE83r/RVllrTAVGfCCyuW603AS8K/img.png&quot; style=&quot;width:480px&quot;/&gt;&lt;/a&gt;&lt;/figure&gt;&lt;ol class=&quot;numbered-list&quot; id=&quot;56575dc3-3f6f-407a-8f96-bceb63ff11c0&quot; start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;li&gt;&lt;strong&gt;마지막에 2×1 타일을 놓는 경우&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol class=&quot;numbered-list&quot; id=&quot;4d58e0f4-2843-4bfb-bdb7-15460ea77e8c&quot; start=&quot;2&quot; type=&quot;1&quot;&gt;&lt;li&gt;&lt;strong&gt;마지막에 1×2 타일 두 개를 세로로 놓는 경우&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol class=&quot;numbered-list&quot; id=&quot;82153aa8-09dc-482a-87eb-5d87472715cd&quot; start=&quot;3&quot; type=&quot;1&quot;&gt;&lt;li&gt;&lt;strong&gt;마지막에 2×2 타일을 놓는 경우&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class=&quot;&quot; id=&quot;84740e4c-c9f3-46bb-a4bb-e45fe73b7ef0&quot;&gt;를 모두 고려한다면, 점화식을 도출이 가능하다.&lt;/p&gt;&lt;p class=&quot;&quot; id=&quot;303216dc-afa6-4094-9886-34f96feacbf1&quot;&gt;
&lt;/p&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;3e574dbf-6620-4acc-b5df-00c2dce50608&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;dp[n] = dp[n-1] + 2 dp[n-2]&lt;/code&gt;&lt;/pre&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;b21be2bc-ad7c-4abe-b17e-9557e5abe19d&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;package 알고리즘.백준.NX2타일링2

import java.io.BufferedReader
import java.io.InputStreamReader

/**
 *packageName    : 알고리즘.백준.NX2타일링2
 * fileName       : Main
 * author         : ipeac
 * date           : 2024-03-04
 * description    :
 * ===========================================================
 * DATE              AUTHOR             NOTE
 * -----------------------------------------------------------
 * 2024-03-04        ipeac       최초 생성
 */
fun main() {
    BufferedReader(InputStreamReader(System.`in`)).use { r -&amp;gt;
        val n = r.readLine()!!.toInt()
        
        val dp = IntArray(1001) //왠지 모르겠는데 n+1 크기로 잡으니까 ArrayindexOutOfBounds 에러가 발생함.
        
        dp[1] = 1
        dp[2] = 3
        
        if (n &amp;lt;= 2) {
            println(dp[n])
            return
        }
        
        for (i in 3..n) {
            dp[i] = (dp[i - 1] + dp[i - 2] * 2) % 10007
        }
        
        println(dp[n])
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;p class=&quot;&quot; id=&quot;89c05c02-6f8c-44e2-a96a-d30a0bd7836b&quot;&gt;
&lt;/p&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>코틀린/알고리즘</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/398</guid>
      <comments>https://oth3410.tistory.com/398#entry398comment</comments>
      <pubDate>Mon, 4 Mar 2024 15:18:36 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린] 10866번 덱</title>
      <link>https://oth3410.tistory.com/397</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;7f6730bd-febb-478f-ae3f-74d26547ac18&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;136c79bd-da1e-4fd4-8b8b-92bcb2c035de&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;package 알고리즘.백준.덱

import java.io.BufferedReader
import java.io.InputStreamReader

/**
 *packageName    : 알고리즘.백준.덱
 * fileName       : Main
 * author         : ipeac
 * date           : 2024-03-02
 * description    :
 * ===========================================================
 * DATE              AUTHOR             NOTE
 * -----------------------------------------------------------
 * 2024-03-02        ipeac       최초 생성
 */
fun main() {
    BufferedReader(InputStreamReader(System.`in`)).use { br -&amp;gt;
        val n = br.readLine().toInt()
        val deque = ArrayDeque&amp;lt;Int&amp;gt;()
        val answer = StringBuilder()
        
        repeat(n) {
            when (val command = br.readLine()) {
                &quot;pop_front&quot; -&amp;gt; answer.appendLine(deque.removeFirstOrNull() ?: -1)
                &quot;pop_back&quot; -&amp;gt; answer.appendLine(deque.removeLastOrNull() ?: -1)
                &quot;size&quot; -&amp;gt; answer.appendLine(deque.size)
                &quot;empty&quot; -&amp;gt; answer.appendLine(if (deque.isEmpty()) 1 else 0)
                &quot;front&quot; -&amp;gt; answer.appendLine(deque.firstOrNull() ?: -1)
                &quot;back&quot; -&amp;gt; answer.appendLine(deque.lastOrNull() ?: -1)
                
                else -&amp;gt; {
                    val (p, x) = command.split(&quot; &quot;)
                    when (p) {
                        &quot;push_front&quot; -&amp;gt; deque.addFirst(x.toInt())
                        &quot;push_back&quot; -&amp;gt; deque.addLast(x.toInt())
                    }
                }
            }
        }
        
        println(answer)
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;36c668cd-adc0-4adc-a263-c51f22fc5163&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;덱(Deck) 관련 문제이다&lt;ul class=&quot;bulleted-list&quot; id=&quot;eb326599-4bbf-4e8d-8ac3-312577c74aef&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;덱까지 구현해서 문제를 풀어보면 좋을 것 같긴하다..&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;b98803b6-e82c-4586-8ae9-f1905f7c306c&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;일단 ArrayDeck 을 사용하였다.&lt;h2 class=&quot;&quot; id=&quot;aeb0e944-57cc-4f67-af42-cc0494830189&quot;&gt;ArrayDeck&lt;/h2&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;146cfd8c-5469-48b5-ae70-d8dd1879c740&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;등장 이유&lt;ul class=&quot;bulleted-list&quot; id=&quot;9c5b02e9-6416-4ff9-9c7f-139be78f59c1&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;효율적인 &lt;code&gt;양방향 큐(deque)&lt;/code&gt; 의 구현을 위해서 등장&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;9e8ca9e7-8f86-43c1-9a30-f609838cb73b&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;장점&lt;ul class=&quot;bulleted-list&quot; id=&quot;40eb5089-b6b1-4727-a8fd-a4b3e7af6af3&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;기존의 &lt;code&gt;LinkedList&lt;/code&gt; 기반 큐의 경우 추가, 제거시에 O(1) 의 성능을 보인다.&lt;ul class=&quot;bulleted-list&quot; id=&quot;0df5164c-8ed3-4afb-8c15-47ccd9becc51&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;ArrayDeck 도 그 면에서는 동일하게 좋다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;19d5bc65-eede-48b5-aa4f-ac9496c126df&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;메모리 사용량의 최적화&lt;ul class=&quot;bulleted-list&quot; id=&quot;af89294f-660a-4f0c-adc7-cc951468e127&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;&lt;code&gt;LinkedList&lt;/code&gt; 같은 연결리스트의 경우 각 노드가 데이터와 함께 다음 노드를 가리키는 포인터를 포함함.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;8c7570f6-35f7-4b94-9943-58c54c03ff6f&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;결국 포인트를 가지고 있음으로서, 그 만큼의 메모리의 추가적인 공간이 필요하게 된다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;ea812454-9783-4457-b9d3-900283cba0f2&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;하지만, ArrayDeck 의 경우 이러한 포인터가 없기에, 단순한 배열 인덱스를 사용하여 요소에 접근한다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;ffb6a83c-8c7d-4f1a-8991-44bfabafdb65&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;랜덤 엑세스 최적화&lt;ul class=&quot;bulleted-list&quot; id=&quot;14661f13-e82b-4b4e-8cb8-66a419f9cf9b&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;배열구조이다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;f3d842b7-627d-4460-a555-4e8640212ac3&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;&lt;code&gt;LinkedList&lt;/code&gt; 같은 경우 연속한 메모리에 위치한 것이 아니기에, 결국 최악 O(n) 의 조회 성능을 기대할 수 있다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;4c773491-aca0-4abc-9418-fa95c43b1448&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;하지만 &lt;code&gt;ArrayDeck &lt;/code&gt;의 경우 배열 구조이기에 &lt;code&gt;인덱스&lt;/code&gt; 를 통한 접근으로 O(1) 시간에 조회가 가능하다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr id=&quot;8c42d696-c932-4158-a096-9f02344610fe&quot;/&gt;&lt;p class=&quot;&quot; id=&quot;28e355bf-528c-4528-90e8-2afa13d63d3a&quot;&gt;
&lt;/p&gt;&lt;p class=&quot;&quot; id=&quot;ebc75433-a96d-460f-ba8d-40d751988985&quot;&gt;잡설하고, 일단 문제 자체는 너무 쉬웠는데,&lt;/p&gt;&lt;p class=&quot;&quot; id=&quot;e7f08ffe-85dd-427e-aa9b-c1da59d1d49b&quot;&gt;단순히 프린트 스트림으로 출력하는 경우 IO 가 반복시마다 발생해서 오버헤드가 있다.&lt;/p&gt;&lt;p class=&quot;&quot; id=&quot;fc533857-4fbe-43ae-9300-2645d47c9fe9&quot;&gt;
&lt;/p&gt;&lt;p class=&quot;&quot; id=&quot;2856f297-00bb-48b1-a37d-af486071d63b&quot;&gt;StringBuilder() 에 담아서 해당 값을 한번의 IO 로 출력하도록하면 통과한다.&lt;/p&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>자바/알고리즘</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/397</guid>
      <comments>https://oth3410.tistory.com/397#entry397comment</comments>
      <pubDate>Sat, 2 Mar 2024 21:53:23 +0900</pubDate>
    </item>
    <item>
      <title>[JPA] .setHint(QueryHints.READ_ONLY, true)</title>
      <link>https://oth3410.tistory.com/396</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;b13bff41-1358-45da-99c1-6b803b2bbb4f&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;h3 class=&quot;&quot; id=&quot;2d041979-97ad-4448-9fd2-aca155913224&quot;&gt;개요&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;8a8b52bc-f5c3-46de-a1eb-21bf632a3dc6&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;JPA 에서 쿼리를 최적화하는 방법 중 하나는 읽기 전용 쿼리를 사용하는 것이다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;96f20cb0-0233-4434-b9b2-0bc3bbe109b6&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;데이터를 변경하지 않는 조회 작업에서 성능의 향상이 가능하다.&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;9f44b7fd-1e30-4d29-a17f-b26e5791cfa7&quot;&gt;방법&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;08e78888-d87b-483a-a958-eb1d408b6970&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;서비스 트랜잭션 안에서 전역적으로 설정&lt;ul class=&quot;bulleted-list&quot; id=&quot;f311c532-f30a-4b82-9626-21e4f6784d61&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;&lt;code&gt;@Transactional(readOnly = true)&lt;/code&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;7b07d895-ad8e-46a0-842f-1ce127b74bd8&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;메서드, 클래스 레벨안에서 모든 DB 작업이 읽기 전용으로 변경됨.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;fb4b270f-b073-431d-920a-f089edd4a304&quot;&gt;&lt;li style=&quot;list-style-type:square&quot;&gt;JPA 하이버네이트 프로바이더가 내부적으로 DB 에 대한 변경 사항을 추적하지 않도록 성능 최적화 수행&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;fc8b6374-cfaa-47ec-8a07-d3248f688f54&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;쿼리자체에서 설정&lt;ul class=&quot;bulleted-list&quot; id=&quot;635d6129-2512-45e9-a957-b8d801051abe&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;&lt;code&gt;.setHint(QueryHints.READ_ONLY, true)&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Java&quot; id=&quot;a7f428df-4f58-416b-b28a-4daa1102d2b6&quot;&gt;&lt;code class=&quot;language-Java&quot;&gt;List&amp;lt;OrderEntity&amp;gt; orders = qf.selectFrom(orderEntity)
    .where(...)
    .setHint(QueryHints.READ_ONLY, true)
    .fetch();&lt;/code&gt;&lt;/pre&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;c3a53e26-23c4-4848-a47b-207ca7222cee&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;해당 쿼리가 데이터를 변경하지 않고 오직 읽기만 수행할 것임을 JPA 프로바이더에게 알려준다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;26d504ec-e17d-4bf0-b7e9-f91ac40067aa&quot;&gt;착안&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;506006ae-8561-47ae-9b6a-a8a1590c126e&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;Spring Data Jpa 도 조회쿼리 자체를 읽기전용으로 들고오진 않는다.&lt;ul class=&quot;bulleted-list&quot; id=&quot;6196fa23-b70e-48c8-8c2f-5957fffca6a4&quot;&gt;&lt;li style=&quot;list-style-type:circle&quot;&gt;앞으로 Data Jpa 같은 경우도 읽기전용 쿼리로 만들어야겠다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;5c011ac5-e6d6-4f88-893b-cefc627c251a&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;서비스 레벨에서의 트랜잭션이 읽기전용이 아니더라도 조회 쿼리자체에 읽기 전용으로 설정한다면 조금이라도 성능의 이점을 가져올 수 있지 않을까?&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;&quot; id=&quot;1516a6cf-6afb-41bf-8760-fc006093aedb&quot;&gt;뒤늦게 생각된 문제점&lt;/h3&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;5688b0b2-2f64-4a8e-a818-e17490a33a14&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;쿼리힌트가 조회로 설정된 경우, 쿼리힌트가 조회인지 아닌지 여부를 고려해서 개발을 해야하는 불필요한 행동이 필요할 것 같다.&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;9602b78c-ca86-4df8-bc26-760d24c22b61&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;그냥 쿼리힌트를 다는것말고, 서비스단에서 트랜잭션으로 관리하는게 나을 것 같기도하다..&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;bulleted-list&quot; id=&quot;e301b7f1-78c6-4570-9237-0e4105d49334&quot;&gt;&lt;li style=&quot;list-style-type:disc&quot;&gt;읽기전용이 아닌 경우에 대량의 조회가 필요한 경우에만 별도의 메서드를 만드는게 어떨까도 싶다.&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;&quot; id=&quot;3b538da8-0456-4b17-8f69-6b981d415146&quot;&gt;
&lt;/p&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>자바/JPA</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/396</guid>
      <comments>https://oth3410.tistory.com/396#entry396comment</comments>
      <pubDate>Sat, 2 Mar 2024 00:05:50 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린 ] 5525 IOIOI [문자열]</title>
      <link>https://oth3410.tistory.com/395</link>
      <description>&lt;body&gt;&lt;html&gt;&lt;head&gt;&lt;link href=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atom-one-dark.min.css&quot; rel=&quot;stylesheet&quot;/&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;link href=&quot;https://rawcdn.githack.com/ppuep94/n2t/5ef4dc01e9d6336341e9ab95bb71672f9d3a3dc9/assets/css/style2.css&quot; rel=&quot;stylesheet&quot;/&gt;&lt;article class=&quot;page sans Notion&quot; id=&quot;884625de-a1af-45d4-a9c3-7917f5013e7f&quot;&gt;&lt;header&gt;&lt;p class=&quot;page-description&quot;&gt;&lt;/p&gt;&lt;/header&gt;&lt;div class=&quot;page-body Tistory&quot;&gt;&lt;script crossorigin=&quot;anonymous&quot; integrity=&quot;sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==&quot; referrerpolicy=&quot;no-referrer&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js&quot;&gt;&lt;/script&gt;&lt;link crossorigin=&quot;anonymous&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&quot; integrity=&quot;sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==&quot; referrerpolicy=&quot;no-referrer&quot; rel=&quot;stylesheet&quot;/&gt;&lt;pre class=&quot;code Kotlin&quot; id=&quot;aa5ff992-6a01-42bf-ba7f-d20378de0558&quot;&gt;&lt;code class=&quot;language-Kotlin&quot;&gt;package 알고리즘.백준.IOIOI

import java.io.BufferedReader

/**
 *packageName    : 알고리즘.백준.IOIOI
 * fileName       : Main
 * author         : ipeac
 * date           : 2024-03-01
 * description    :
 * ===========================================================
 * DATE              AUTHOR             NOTE
 * -----------------------------------------------------------
 * 2024-03-01        ipeac       최초 생성
 */
fun main() {
    BufferedReader(System.`in`.reader()).use { br -&amp;gt;
        val n = br.readLine().toInt()
        val m = br.readLine().toInt()
        val s = br.readLine()
        
        var answer = 0
        var patternCount = 0
        var index = 0
        
        while (index &amp;lt; m - 1) {
            if (s[index] == 'I' &amp;amp;&amp;amp; s[index + 1] == 'O' &amp;amp;&amp;amp; index + 2 &amp;lt; m &amp;amp;&amp;amp; s[index + 2] == 'I') {
                patternCount++
                
                if (patternCount == n) {
                    answer++
                    //패턴이 겹칠 가능성이 있기에, 카운트를 하나 줄인다. ( 이전 카운트를 기억할 수 있음 (효율))
                    patternCount--
                }
                
                index += 2
            } else {
                patternCount = 0
                index++
                
                // I 를 만날때까지 index를 증가시킨다.
                while (index &amp;lt; m &amp;amp;&amp;amp; s[index] != 'I') {
                    index++
                }
            }
        }
        
        println(answer);
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;p class=&quot;&quot; id=&quot;29dba252-b7ec-43cc-95ac-a288a14c610d&quot;&gt;
&lt;/p&gt;&lt;html&gt;&lt;body&gt;&lt;br/&gt;&lt;p class=&quot;&quot;&gt;Uploaded by &lt;mark class=&quot;highlight-orange&quot;&gt;&lt;a href=&quot;https://github.com/jmjeon94/N2T&quot;&gt;N2T&lt;/a&gt;&lt;/mark&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&lt;/div&gt;&lt;/article&gt;&lt;span class=&quot;sans&quot; style=&quot;font-size:14px;padding-top:2em&quot;&gt;&lt;/span&gt;&lt;/body&gt;</description>
      <category>자바/알고리즘</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/395</guid>
      <comments>https://oth3410.tistory.com/395#entry395comment</comments>
      <pubDate>Sat, 2 Mar 2024 00:05:41 +0900</pubDate>
    </item>
    <item>
      <title>[코틀린] 21736 헌내기는 친구가 필요해</title>
      <link>https://oth3410.tistory.com/394</link>
      <description>&lt;pre id=&quot;code_1709222839649&quot; class=&quot;kotlin&quot; data-ke-language=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;package 알고리즘.백준.헌내기는친구가필요해

import java.io.BufferedReader
import java.io.BufferedWriter
import java.io.InputStreamReader
import java.io.OutputStreamWriter
import java.util.*

val dx = intArrayOf(-1, 1, 0, 0)
val dy = intArrayOf(0, 0, -1, 1)

data class Position(val x: Int, val y: Int)

fun main() {
    val reader = BufferedReader(InputStreamReader(System.`in`))
    val writer = BufferedWriter(OutputStreamWriter(System.out))

    reader.use { r -&amp;gt;
        writer.use { w -&amp;gt;
            val (n, m) = r.readLine().split(&quot; &quot;).map { it.toInt() }
            val graph = Array(n) { CharArray(m) }
            val visited = Array(n) { BooleanArray(m) { false } }

            var doyeon = Position(0, 0)

            for (i in 0 until n) {
                val line = r.readLine()
                for (j in 0 until m) {
                    val value: Char = line[j]

                    if (value == Tile.DOYEON.value) {
                        doyeon = Position(i, j)
                    }

                    graph[i][j] = value
                }
            }

            bfs(graph, visited, doyeon, n, m).let { if (it &amp;gt; 0) println(it) else println(&quot;TT&quot;) }
        }
    }
}

fun bfs(campus: Array&amp;lt;CharArray&amp;gt;, visited: Array&amp;lt;BooleanArray&amp;gt;, doyeon: Position, n: Int, m: Int): Int {
    val queue: LinkedList&amp;lt;Position&amp;gt; = LinkedList()
    queue.add(doyeon)
    visited[doyeon.x][doyeon.y] = true

    var count = 0

    while (queue.isNotEmpty()) {
        val (x, y) = queue.poll()

        for (i in 0 until 4) {
            val nx = x + dx[i]
            val ny = y + dy[i]

            if (nx in 0 until n &amp;amp;&amp;amp; ny in 0 until m &amp;amp;&amp;amp; !visited[nx][ny]) {
                when (campus[nx][ny]) {
                    Tile.EMPTY.value -&amp;gt; {
                        visited[nx][ny] = true
                        queue.add(Position(nx, ny))
                    }

                    Tile.PERSON.value -&amp;gt; {
                        count++
                        visited[nx][ny] = true
                        queue.add(Position(nx, ny))
                    }
                }
            }
        }
    }

    return count
}

enum class Tile(val value: Char) {
    EMPTY('O'),
    WALL('X'),
    DOYEON('I'),
    PERSON('P')
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>자바/알고리즘</category>
      <author>OverTheHorizon3410</author>
      <guid isPermaLink="true">https://oth3410.tistory.com/394</guid>
      <comments>https://oth3410.tistory.com/394#entry394comment</comments>
      <pubDate>Fri, 1 Mar 2024 01:07:29 +0900</pubDate>
    </item>
  </channel>
</rss>