<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    
    <title>Home</title>
    
    
    <description>Just Random Blog</description>
    
    <link>https://koo5590.github.io/</link>
    <atom:link href="https://koo5590.github.io/feed.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title></title>
        <description>
          
          LeetCode 739. Daily Temperature 1) Problem Description   Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible,...
        </description>
        <pubDate>Tue, 23 Jun 2020 08:05:53 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-23-2020-05-15-L739/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-23-2020-05-15-L739/</guid>
      </item>
    
      <item>
        <title>Properties of XOR</title>
        <description>
          
          refernce Properties of XOR Commutative: A ⊕ B = B ⊕ A Associative: A ⊕ ( B ⊕ C ) = ( A ⊕ B ) ⊕ C Identity element: A ⊕ 0 = A Self-inverse: A ⊕ A = 0 Parity: for any n bits, A1 ⊕ A2 ⊕...
        </description>
        <pubDate>Tue, 23 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-23-xor/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-23-xor/</guid>
      </item>
    
      <item>
        <title>Time and Space Complexity of Binary Tree Inorder Traversal</title>
        <description>
          
          Recursion -time complexity: O(n) ( recurrrence relation: T(n) = 2*T(n/2)+1 ) -space complexity: O(h) (where h is the height of the tree) why? At most n activation records are on the stack at one point (in the worst case) Iteration: using stack -time complexity: O(n) -space complexity: O(n) Morris Traversal...
        </description>
        <pubDate>Sun, 21 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-21-cs1/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-21-cs1/</guid>
      </item>
    
      <item>
        <title>LeetCode 617</title>
        <description>
          
          LeetCode 617: Merge Two Binary Trees 문제 자체는 크게 어려울 게 없다. 두 개의 바이너리 트리를 겹친다고 생각하고, 겹치는 두 노드가 있을 경우 두 노드의 값만 더해주면 된다. 트리 문제여서 간단하게 재귀로 해결하였는데, 나는 일일히 비교하였지만 다른 사람의 코드를 보다가 시간을 줄일 수 있는 좋은 코드를 찾았다. class Solution {...
        </description>
        <pubDate>Fri, 19 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-19-L617/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-19-L617/</guid>
      </item>
    
      <item>
        <title>How to speed up I/O on LeetCode?</title>
        <description>
          
          Recently while I was reading through other’s codes on LeetCode, I encountered a few lines of code that were mysterious to me. static int fastio = []() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); return 0; }(); I knew it was for fast I/O but I couldn’t grasp the idea of how it...
        </description>
        <pubDate>Fri, 19 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-19-L/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-19-L/</guid>
      </item>
    
      <item>
        <title>About different styles of FOR loops</title>
        <description>
          
          There are 4 differents ways to iterate through an array. FIRST // C style for(int i=0; i&amp;lt;list.size(); i++) list[i] = 0; SECOND //copies each elemenet in the list to x for(auto x:list) x = 0; THIRD //using reference declaration, //which makes x an alias for each element in the list...
        </description>
        <pubDate>Fri, 19 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-19-C/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-19-C/</guid>
      </item>
    
      <item>
        <title>739. Daily Temperature</title>
        <description>
          
          LeetCode 739. Daily Temperature 1) Problem Description   Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible,...
        </description>
        <pubDate>Wed, 17 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-17-L739/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-17-L739/</guid>
      </item>
    
      <item>
        <title>LeetCode 338. Counting Bits</title>
        <description>
          
          Counting Bits 1) 문제분석   num이라는 음이 아닌 정수가 주어졌을 때, 0부터 num까지의 각 정수를 이진수로 표현했을 때 1의 개수를 차례로 벡터에 저장해서 반환하는 메소드를 작성해야 한다. 가장 쉽게 생각할 수 있는 방법은, bit연산을 이용해서 각 정수 i에 대해 0과 1의 개수를 하나씩 살펴볼 수 있는데, 이렇게 하는 경우 시간 복잡도가...
        </description>
        <pubDate>Sat, 13 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-13-L338/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-13-L338/</guid>
      </item>
    
      <item>
        <title>Baekjoon 17406</title>
        <description>
          
          백준 17406번: 배열 돌리기4 1) 문제분석   (r,c,s)라는 값이 주어졌을 때, (r,c)를 기준으로 (r-s,c-s)에서 시작해서 (r+s,c+s)에서 끝나는 사각형 안의 배열 값들을 시계 방향으로 한 칸씩 이동시키는 연산이 있다. 배열값은 배열의 각 행의 모든 값들의 합의 최솟값이다. 문제는 주어진 여러 연산이 있을 때, 임의의 순서대로 이 연산들을 수행했을 때 가능한 배열의 최솟값을...
        </description>
        <pubDate>Sat, 06 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-06-B17406/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-06-B17406/</guid>
      </item>
    
      <item>
        <title>Baekjoon 17471</title>
        <description>
          
          백준 17471번: 게리맨더링 1. 문제 분석 문제의 조건들은 다음과 같다: N개의 구역들을 두 개의 선거구로 나눈다 각 선거구에는 최소 1개의 구역이 포함되어야 한다 같은 선거구에 포함된 구역들은 서로 연결되어야 한다 (사이에 다른 선거구에 포함된 구역이 있어서는 안 된다) 각 선거구의 총 인구 수의 차의 최솟값을 구해야 한다 주의할 점은 한...
        </description>
        <pubDate>Thu, 04 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-04-B17471/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-04-B17471/</guid>
      </item>
    
      <item>
        <title>Baekjoon 3649</title>
        <description>
          
          백준 3649번: 로봇 프로젝트 1) 문제 분석   길이의 합이 x와 같은 조각 2개를 찾아내는 문제이다. 모든 원소에 대해 하나씩 비교를 해서 답을 구하는 식으로 코드를 작성하면 대략 O(n^2)의 시간복잡도가 나오며, 레고의 최대 개수가 1,000,000개이기 때문에 효율적이지 못하다. 우선 크기 순으로(오름차순)으로 정렬한 뒤에, l과 r이라는 두 변수를 이용해서 양 끝에서 한...
        </description>
        <pubDate>Wed, 03 Jun 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-06-03-B3649/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-06-03-B3649/</guid>
      </item>
    
      <item>
        <title>Baekjoon 1937</title>
        <description>
          
          백준 1937번: 욕심쟁이 판다 1) 문제 분석 첫 번째 시도   내가 짚은 문제의 핵심은 판다는 대나무가 지금 칸보다 더 많은 칸으로 밖에 이동할 수 없으며, 판다가 살 수 있는 최대 일수를 구해야 한다는 것이었다. 최대 일수를 구하라는 점과 대나무숲이 directional graph로 표현될 수 있다는 점에서 착안해서, 각 노드에서 dfs를 수행했을...
        </description>
        <pubDate>Tue, 26 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-26-B1937/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-26-B1937/</guid>
      </item>
    
      <item>
        <title>Baekjoon 15686 &amp; Time Complexity of Recursion</title>
        <description>
          
          백준 15686번: 치킨 배달 1) 문제 분석   처음에는 M개의 치킨집을 고르는 모든 경우를 구하는 계산이 시간이 많이 걸릴거라고 생각해서 다른 방법을 쓸려고 했는데 다시 생각해보니까 치킨집의 최대 갯수가 13개 밖에 되지 않아서 그렇게 오래 걸리지 않다는 걸 깨달았다. M개의 치킨집만 구하면 나머지 연산은 간단하다. 각 집에서부터 가장 가까운 치킨집까지의 거리의...
        </description>
        <pubDate>Sun, 24 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-24-B15686/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-24-B15686/</guid>
      </item>
    
      <item>
        <title>Baekjoon 1149</title>
        <description>
          
          백준 1149번: RGB거리 1) 문제 분석   DP 문제라는걸 몰랐으면 풀지 못했을 것 같은 문제. 두 번째 집부터 차례로 해당 집을 빨간색, 초록색, 파란색으로 칠했을 때의 각각의 경우의 최솟값을 계속 구해주면 된다. 예를 들어, i번째 집에서 우선 빨간색을 칠한다고 가정하면, i-1번째 집은 파란색, 초록색만 칠할 수 있으며 i-1번째 집을 파란색으로 칠한...
        </description>
        <pubDate>Sun, 24 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-24-B1149/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-24-B1149/</guid>
      </item>
    
      <item>
        <title>Baekjoon B17281</title>
        <description>
          
          백준 17281번: ⚾ 거진 일주일 만에 쓰는 포스트- 1) 문제 분석   일단 모든 순열에 대해 경기 점수를 따져보면 될 것 같은 문제였는데 그렇게하면 실행 시간이 꽤 걸릴 것 같아서 더 효율적인 방법이 없나 한참을 고민하다가 결국 순열 구하는 재귀함수를 이용해서 해결한 문제이다. 혹시나해서 다른 사람들 코드를 살펴봤는데 다른 방법은 보지...
        </description>
        <pubDate>Sat, 23 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-23-B17281/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-23-B17281/</guid>
      </item>
    
      <item>
        <title>B1436</title>
        <description>
          
          백준 1436번: 영화감독 숌 1) 문제분석: N이 주어졌을 때, 6이 적어도 3번 이상 반복되는 N번째 숫자를 구해야한다. 일단 가장 간단하게 생각해서 1부터 구하고 싶은 N번째 숫자가 나올 때까지 자연수 하나하나 조건에 해당하는지 살펴볼 수 있다. 조건은 간단하게 6이 3번 이상 반복되는 것이므로, 우선 %(modulo) 연산을 이용해 각 자릿수를 살펴본다. 이...
        </description>
        <pubDate>Sat, 16 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-16-B1436/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-16-B1436/</guid>
      </item>
    
      <item>
        <title>Set</title>
        <description>
          
          집합 자료구조: set 1. 기본 연산: 원소 추가, 원소 탐색, 원소 삭제 2. c++ 표준 라이브러리 &amp;lt;set&amp;gt;: 균형 잡힌 이진 탐색 트리를 기반으로 만들어짐, 원소들이 정렬됨 (time complexity: O(logn)) associative: Elements are referenced by their key and not by their absolute position in the container ordered: Elements follow a strict...
        </description>
        <pubDate>Mon, 11 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-11-set/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-11-set/</guid>
      </item>
    
      <item>
        <title>Recursive Algorithms</title>
        <description>
          
          재귀적 알고리즘 1) 부분집합 생성하기 n개의 원소를 가진 집합 s가 있다. s의 부분집합을 구하라 vector&amp;lt;int&amp;gt; subset; void search(int k){ //원소 k if (k==n+1){ //부분집합 완성: 적절한 처리를 한다 } else{ //k를 부분집합에 포함 subset.push_back(k); search(k+1); //k를 포함하는 부분집합 완성하기 //k를 부분집합에 불포함 subset.pop_back(); search(k+1); //k를 포함하지 않는 부분집합 완성하기 }...
        </description>
        <pubDate>Mon, 11 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-11-recursive/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-11-recursive/</guid>
      </item>
    
      <item>
        <title>Baekjoon 2941</title>
        <description>
          
          백준 2941번: 크로아티아 알파벳 1) 문제 분석   두 가지 방법이 떠올랐다. 하나는 단어의 문자를 처음부터 하나씩 읽어가면서 따지는 것이고 다른 하나는 문자열에서 크로아티아 알파벳에 해당되는 부분을 알파벳이 아닌 문자(여기서는 “?”)로 전부 바꿔주고, 마지막에 이 문자열의 길이를 출력해주는 것이다. 첫 번째 방법은 C 스타일이고 두 번째 방법은 C++의 string 메소드들도 쉽게...
        </description>
        <pubDate>Sat, 09 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-09-B2941/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-09-B2941/</guid>
      </item>
    
      <item>
        <title>Baekjoon 15953</title>
        <description>
          
          백준 15953번: 상금 헌터 1) 문제 분석   매우매우 간단한 문제이다. 각 줄에서 2018년과 2019년 등수를 차례로 입력받고, 그 등수에 해당하는 상금이 총 얼마인지 계산하면 된다. if-else문 사용하면 쉽게 해결할 수 있지만, 문제가 쉬운만큼 연습도 해볼 겸 별 건 아니지만 수정하기 쉬운 코드로 작성해보았다.   만약 몇 등의 몇 명이 얼마는 받는지와...
        </description>
        <pubDate>Fri, 08 May 2020 00:00:00 -0700</pubDate>
        <link>https://koo5590.github.io/2020-05-08-B15953/</link>
        <guid isPermaLink="true">https://koo5590.github.io/2020-05-08-B15953/</guid>
      </item>
    
  </channel>
</rss>
