최신 글
-
[LeetCode] 516. Longest Palindromic Subsequence (golang)
문제Longest Palindromic Subsequence - LeetCodeGiven a string s, find the longest palindromic subsequence's length in s. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. Example 1: Input: s = "bbbab"Output: 4Explanation: One possible longest palindromic subsequence is "bbbb".https://leetco..
2021.06.14
-
[LeetCode] 409. Longest Palindrome (golang)
문제Longest Palindrome - LeetCodeGiven a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters. Letters are case sensitive, for example, "Aa" is not considered a palindrome here. Example 1: Input: s = "abccccdd"Output: 7Explanation: One longest palindrome that can be built is "dccaccd", whose length is 7.https://..
2021.06.12
-
[LeetCode] 104. Maximum Depth of Binary Tree (golang)
문제Maximum Depth of Binary Tree - LeetCodeLevel up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.https://leetcode.com/problems/maximum-depth-of-binary-tree/이진 트리에서 최대 깊이 구하기 구현모든 가지를 탐색하여 깊이를 갱신 ( N ) 시간 복잡도O(N) 코드/** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Righ..
2021.06.07
-
[LeetCode] 66. Plus One (golang)
문제Plus One - LeetCodeGiven a non-empty array of decimal digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contains a single digit.https://leetcode.com/problems/plus-one/정수의 각 자릿수를 나타내는 배열에서 그 정수에 1을 더한 값을 나타내는 배열 구하기 구현맨 뒤에서부터 1을 더함더했을 때 9가 넘으면 0을 주고 그 다음으로..
2021.06.02
-
[LeetCode] 205. Isomorphic Strings (golang)
문제Isomorphic Strings - LeetCodeGiven two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the order of characters.https://leetcode.com/problems/isomorphic-strings/구조가 같은 문자열 구분 구현각 문자열의 문자를 키로 받는 맵을 두 문자열 각각 생성문자열을 탐색하며 각 맵에..
2021.06.02
-
[LeetCode] 455. Assign Cookies (golang)
문제Assign Cookies - LeetCodeAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g[i], which is the minimum size of a cookie that the child will be content with; and each cookie j has a size s[j].https://leetcode.com/problems/assign-cookies/쿠키를 나눠주어 만족시킬 수 있는 아이들의 최대수 구현정렬 ( NlogN? )아이에게 줄..
2021.06.01
-
[LeetCode] 572. Subtree of Another Tree (golang)
문제Subtree of Another Tree - LeetCodeGiven the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false otherwise. A subtree of a binary tree tree is a tree that consists of a node in tree and all of this node's descendants.https://leetcode.com/problems/subtree-of-another-tree/부분 트리 유무 확인 구현root트리 탐색 ( N..
2021.06.01
-
터커의 '컴맹을 위한 프로그래밍 기초 강좌' 후기
목차소개후기 한동안 안 쓰던 golang을앞으로 또 쓸 일이 많이 생길 거 같아유튜브에서 golang 강의를 하나 정주행하게 되었다 소개컴맹을 위한 Go 언어 기초 프로그래밍 기초 강좌 1 - 트랜지스터를 알아보자Tucker 의 프로그래밍 기초 강좌 입니다.기초 이론 부터 차근차근 진행하려 합니다.1강 컴퓨터 원리와 구조 입니다.https://youtu.be/Tq3W8UyltFs 최근에 Tucker의 Go 언어 프로그래밍 라는 책도 발간하신 ( 구매했지만 아직 읽어보진 못했다 )터커님의 유튜브 강의인데 제목에서도 알 수 있듯이초보자들이 입문할 때 듣기 좋은 내용들로 강의가 구성되어 있다 하지만일반적으로 언어 문법에 대해서만 설명서 처럼설명하는 일부 타강의들과는 달리'컴맹을 위한 기초 프로그래밍 ' 치고는..
2021.05.27
-
[영문법] 동사(4) - 보충어
원문개발자영어 : [연재] 한국 개발자들을 위한 영어 강의 - 5연재] 한국 개발자들을 위한 영어 강의 - 5. 동사에 대하여...(5) 3강과 4강을 통해 우리는 동사의 형성과 발전에 대해 논의하면서, 동사란 명사와 생성근원이 같고, '꾸밈-개념'이라는 면에서 유사성을 발견할 수 있으되, 명사는 주로 꾸밈의 발전이 많은 반면에, 동사는 보충어의 발전이 많다는 것을 이야기해 보았습니다. 명사에 대해서는...https://www.facebook.com/groups/engfordev/permalink/683059318412563/ 목차원문술부보충어와 언어적 긴장감준동사형태 술부동사(1) - 문장의 구조 에서설명했던 것처럼 영어의 문장은 결국 주부와 술부로 이루어지며술부는 크게 보면 동사와 보충..
2021.05.12
인기 글
-
[mysql] 정렬 후 그룹화
목차조인 & 그룹화 하기JSON 형식으로 만들기정렬하기최종 쿼리참고 며칠 전db 테이블에서 컬럼을 뽑아내JSON 형식으로 만들어 낼 일이 있어 쿼리를 짜는데정렬이 잘 안돼서 애 먹은 적이 있다 하고자 했던 동작은 위의 2개의 테이블을 가지고 목표 이런식으로 뽑아내는 게 목표였다 💡그리고 ORDER_RANK가 있기에 'ITEM_LIST' 에도 ORDER_RANK 순으로 쌓이게 하려 했다 조인 & 그룹화 하기우선 두 테이블을 가지고 ORDER_SEQ로 그룹화 해야 하므로기본적으로 SELECT * FROM ORDER_TABLE o JOIN ITEM_TABLE i ON o.ITEM_SEQ = i.ITEM_SEQ GROUP BY o.ORDER_SEQ; ITEM_SEQ 을 기준으로 조인ORDER_SE..
2021.02.02
-
스프링부트, 그래들 프로파일
목차스프링부트 프로파일 설정application-{profile}.properties 생성application.properties 설정+ Configuration 설정그래들 프로파일 설정build.gradle 설정실행시 옵션 지정참고 로컬과 개발환경, 서비스 환경에 따라설정을 다르게 하고 싶을 때프로파일을 설정하고 사용할 수 있다 💡이 때 방법으로스프링 자체에서 기능을 사용하는 방법과프로젝트 관리 도구인 그래들이나 메이븐을 사용하는 방법 ( 여기서는 그래들 사용 )두 가지가 있다 스프링부트 프로파일 설정소스는 그대로 빌드 후스프링 프레임워크가 설정된 프로파일을 사용 application-{profile}.properties 생성 ex) application-prod.properties, applicati..
2021.02.10
-
[노션] 플래너 만들어 쓰기
목차노션이란노션의 특징플래너 만들기노션 페이지 나는 평소에메모하거나 정리할 것들이 있을 때노션을 주로 사용한다( tmi로 이 블로그의 글들도 모두 노션으로 작성한다 ) 노션이란💡'구조화'된 메모장 간단하게는 필기를 정리할 수도 있고깊게는 홈페이지가 될 수도 있다 개인적으로는가볍게 사용하다 보면나만의 자료 정리함? 홈페이지?의 느낌이 강하다 노션의 특징블록과 페이지라는 단위로메모 혹은 자료를 정리하는데이런 기능으로 📚자료를 정리할 때 뭔가 커스터마이징하고 싶지만 일일이 하기는 어렵거나 귀찮을 때 유용하다 완전히 자유롭지는 않아 구현에 제한을 두는 한편기본 기능만으로 웬만한 구조로 커스텀할 수 있어'자유도와 편리함 ' 사이에 적절한 중간점을 잘 찾은 앱이라고 생각된다 장점어느정도..
2021.03.06
-
[영문법] 동사(2) - 시제/상/태
원문Jae Hyun Lee연재] 한국 개발자들을 위한 영어 강의 - 3. 동사에 대하여...(1) 지난 시간까지 언어란 '명사'와 '동사'를 엮은 것이고, 언어간의 차이는 그 엮음새의 차이일 뿐, 명사와 동사는 전 언어 공통이라는 상식적 결론에 이르렀습니다. 따라서 외국어를 공부할 때는 단어를 많이 아는 것보다는 그 엮음새에 대한 지식을 이해하고, 그것을 반복, 숙달함으로서...https://www.facebook.com/groups/engfordev/permalink/647501638634998/Jae Hyun Lee연재] 한국 개발자들을 위한 영어 강의 - 3. 동사에 대하여...(2) 지난 시간에, 영어의 동사는 '시제', '상', '..
2021.02.16
-
Go run, build, install?
목차go rungo buildgo installgo install go get 참조 go rungo 파일을 컴파일 하지만실행 파일을 임시 디렉토리에 둔 후실행이 끝나면 삭제 작은 프로그램을 테스트 할 때 유용 go buildgo 파일을 컴파일 하여실행 파일을 현재 디렉토리에 생성 원격에서 실행하려 할 때 유용 go installgo 파일을 컴파일 하여실행 파일을 GOBIN 환경 변수에 설정된 경로에 생성( 기본은 $GOPATH/bin ) 로컬에서 작성하고 사용할 때 유용 go install 패키지를 컴파일 하여.a 파일을 $GOPATH/pkg 에 생성( import 은 이 .a 파일을 참조함 ) go get 패키지를 다운받아패키지 소스 파일을 $GOPATH/src/ 에 생성그 후 go install 동작..
2021.01.20