<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://sunjae95.github.io/</id><title>Sun's Blog</title><subtitle>A minimal, portfolio, sidebar, bootstrap Jekyll theme with responsive web design and focuses on text presentation.</subtitle> <updated>2022-04-17T02:31:14+09:00</updated> <author> <name>SeonjaeLee</name> <uri>https://sunjae95.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://sunjae95.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="ko" href="https://sunjae95.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.2.2">Jekyll</generator> <rights> © 2022 SeonjaeLee </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>백준 - 토마토</title><link href="https://sunjae95.github.io/posts/7576/" rel="alternate" type="text/html" title="백준 - 토마토" /><published>2022-04-17T00:00:00+09:00</published> <updated>2022-04-17T00:00:00+09:00</updated> <id>https://sunjae95.github.io/posts/7576/</id> <content src="https://sunjae95.github.io/posts/7576/" /> <author> <name>SeonjaeLee</name> </author> <category term="Algorithm" /> <category term="Baekjoon" /> <summary> 토마토 - 7576번 문제링크: 토마토 🤔접근 방법 익은 토마토와 익지 않은 토마토가 붙어있고 다음날이 된다면, 익지 않은 토마토는 익게 되는 것을 보고 점차 퍼지는 것이 머릿속에 그려졌다. 그래서 그래프 탐색과 연관 있다고 생각하게 됐다. 최소 일수를 구하라는 지문을 보고 BFS를 생각하게 됐다. BFS 특성상 같은 deps의 노드를 탐색하기 때문에 이를 deps = 날짜라고 생각했다. 기존 BFS는 첫 시작이 하나의 노드라면 여기서는 토마토가 1개 이상일 수도 있기 때문에 탐색 시 1개 이상의 노드를 넣어주어 BFS 알고리즘을 사용했다. 🤗풀이 방법 배열 입력 시 익은 토마토(숫자 1) 입력 시 total(전체 토마토)에서 빼주고 토마토가 빈 곳(숫자 -1)이라면 이 또한 tota... </summary> </entry> <entry><title>백준 - Z</title><link href="https://sunjae95.github.io/posts/1074/" rel="alternate" type="text/html" title="백준 - Z" /><published>2022-04-12T00:00:00+09:00</published> <updated>2022-04-12T00:00:00+09:00</updated> <id>https://sunjae95.github.io/posts/1074/</id> <content src="https://sunjae95.github.io/posts/1074/" /> <author> <name>SeonjaeLee</name> </author> <category term="Algorithm" /> <category term="Baekjoon" /> <summary> Z - 1074번 문제링크: Z1074 🤔접근 방법 문제를 어떻게 풀어야 될지 몰라서 문제의 알고리즘 분류를 보고 힌트를 얻어 분할정복 알고리즘을 찾아봤다. 처음에는 어떻게 적용할까 고민했다. 분할정복은 간단히 설명하면 탐색하고 싶은 구간을 일정 규칙에 의해 분할하고 더 이상 쪼갤 수 없다면 병합해주는 알고리즘이다. 이 문제는 분할정복이지만 내가 봤을 때는 병합보다는 분할에 초점을 두고 푸는게 이상적이라 생각한다. 분할만 생각하게 된 계기 4등분을 할 수 있다. 수많은 것 중 한 개를 선택한다 = 더 이상 쪼갤 수 없다. 🤗풀이 방법 시작 지점과 끝 지점과 사각형의 최대길이를 생성한다. 사분면으로 쪼개야 되기 때문에 while문 시작 시 최대길이를 2로 나누어준다. ... </summary> </entry> <entry><title>백준 - 경비원</title><link href="https://sunjae95.github.io/posts/police/" rel="alternate" type="text/html" title="백준 - 경비원" /><published>2022-04-11T00:00:00+09:00</published> <updated>2022-04-11T00:00:00+09:00</updated> <id>https://sunjae95.github.io/posts/police/</id> <content src="https://sunjae95.github.io/posts/police/" /> <author> <name>SeonjaeLee</name> </author> <category term="Algorithm" /> <category term="Baekjoon" /> <summary> 경비원 - 2564번 문제링크: 경비원2564 🤔접근 방법 문제에서 지도가 나와있듯이 처음에는 2차원 배열로 접근을 할지 숫자 계산(좌표)으로 접근할지 고민을 했다. 하지만 블록과 블록 사이를 지나가지 못한다는 지문을 보고 숫자 계산(좌표)으로 접근했다. 어떤 기준을 가지고 계산을 해야 다양한 예시가 입력돼도 일정한 답을 도출할까를 고민했다. 이 문제를 풀 때 분기점을 나누는 방법을 생각하기까지 도움이 된 방법이다. 고정 위치(동근이)와 가변 위치(상점)의 방향을 어떻게 처리할 것인가? 항상 정해진 최솟값이 있는가? 이 두 생각을 가지고 계속 문제를 풀기 위해 고민했다. 🤗풀이 방법 고정위치와 가변위치의 방향이 같다면 길이 비교 다르다면 마주보고 있는지 확인하여 반대방향... </summary> </entry> <entry><title>Closure에 대해서</title><link href="https://sunjae95.github.io/posts/closure/" rel="alternate" type="text/html" title="Closure에 대해서" /><published>2022-04-04T00:00:00+09:00</published> <updated>2022-04-04T00:00:00+09:00</updated> <id>https://sunjae95.github.io/posts/closure/</id> <content src="https://sunjae95.github.io/posts/closure/" /> <author> <name>SeonjaeLee</name> </author> <category term="Frontend" /> <category term="JavaScript" /> <summary> 🪂개요 클로저란 개념은 알고는 있었지만 면접이나 다른사람에게 설명할 때 말을 못했던 경험이 많았기 때문에 나만의 언어로 글을 쓰고 정리해보고 싶어 이번 포스팅을 하게 됐다. 🤔클로저란? 자신의 렉시컬 스코프를 기억하는 반환된 함수이다. 🤔렉시컬 스코프란? 자바스크립트엔진이 함수를 어디서 정의했는지에 따라 상위 스코프를 결정하는것이다. // 렉시컬 스코프를 따른다는 예제 1 const x = 1; function foo() { const x = 10; bar(); } function bar() { console.log(x); } foo(); // 1 foo에서 10으로 초기화된 변수 x를 bar에서 출력하지 않은 이유 다음과 같다. bar는 전역스코프에 선언되어있기 때문에 ... </summary> </entry> <entry><title>3주차 - 검색어 추천 구현</title><link href="https://sunjae95.github.io/posts/3w_2/" rel="alternate" type="text/html" title="3주차 - 검색어 추천 구현" /><published>2022-02-20T00:00:00+09:00</published> <updated>2022-02-20T00:00:00+09:00</updated> <id>https://sunjae95.github.io/posts/3w_2/</id> <content src="https://sunjae95.github.io/posts/3w_2/" /> <author> <name>SeonjaeLee</name> </author> <category term="원티드프리온보딩" /> <category term="Task" /> <summary> 📃구현 CheckList!! 검색 시 버튼 생성 검색 시 연관된 글자 출력 📖회고 내용 🙋‍♂️소비자가 원하는 우선순위 정하기 처음 검색창이라는 단어를 들었을 때 Trie자료구조 써서 해야겠다라는 생각이 들었다. Trie를 사용해서 검색어를 표출하는 것도 좋지만 검색창을 설계 시 우선순위가 높지 않다는 생각이 들어, 어떤 기준을 가지고 표출할지를 고민하게 됐다. 첫 번째는 검색어 기준으로 우선순위 판단하기 모든 출력 순서는 사전순 검색어가 상품명과 브랜드명에 속할 때 검색어가 상품명에 속할 때 검색어가 브랜드명에 속할 때 이렇게 네 가지 기준을 가지고 검색어 추천을 표출하는 방법을 고민했다. 이렇게 한다면 연관된 검색어가 나오는 것은 맞지만, 검색어 추천에 ... </summary> </entry> </feed>
