최신 글
-
[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
인기 글
-
스프링부트, 그래들 프로파일
목차스프링부트 프로파일 설정application-{profile}.properties 생성application.properties 설정+ Configuration 설정그래들 프로파일 설정build.gradle 설정실행시 옵션 지정참고 로컬과 개발환경, 서비스 환경에 따라설정을 다르게 하고 싶을 때프로파일을 설정하고 사용할 수 있다 💡이 때 방법으로스프링 자체에서 기능을 사용하는 방법과프로젝트 관리 도구인 그래들이나 메이븐을 사용하는 방법 ( 여기서는 그래들 사용 )두 가지가 있다 스프링부트 프로파일 설정소스는 그대로 빌드 후스프링 프레임워크가 설정된 프로파일을 사용 application-{profile}.properties 생성 ex) application-prod.properties, applicati..
2021.02.10
-
golang 상속? 임베딩?
임베딩go 언어에는 상속이 없다 대신 임베딩을 통한 조합으로 상속과 유사한 효과를 볼 수 있다 표현type SmartPhone struct { Navigation }위와 같이 구조체 안에 변수명 없이 타입명만 정의 하는 것으로 그 타입(구조체)을 임베딩할 수가 있다 만일 SmartPhone이 변수명 있는 Navigation 타입의 멤버를 갖는다고 해보자type SmartPhone struct { navi Navigation } 이 때 SmartPhone에서 멤버 navi가 갖고 있는 Navigate()을 그대로 사용하고 싶다면 다음과 같이 함수를 만들 수 있다func (sp SmartPhone) Navigate() { return sp.navi.Navigate() } 그럼 아래와 같이 SmartPhone..
2021.01.08
-
[영문법] 동사(2) - 시제/상/태
원문Jae Hyun Lee연재] 한국 개발자들을 위한 영어 강의 - 3. 동사에 대하여...(1) 지난 시간까지 언어란 '명사'와 '동사'를 엮은 것이고, 언어간의 차이는 그 엮음새의 차이일 뿐, 명사와 동사는 전 언어 공통이라는 상식적 결론에 이르렀습니다. 따라서 외국어를 공부할 때는 단어를 많이 아는 것보다는 그 엮음새에 대한 지식을 이해하고, 그것을 반복, 숙달함으로서...https://www.facebook.com/groups/engfordev/permalink/647501638634998/Jae Hyun Lee연재] 한국 개발자들을 위한 영어 강의 - 3. 동사에 대하여...(2) 지난 시간에, 영어의 동사는 '시제', '상', '..
2021.02.16
-
터커의 '컴맹을 위한 프로그래밍 기초 강좌' 후기
목차소개후기 한동안 안 쓰던 golang을앞으로 또 쓸 일이 많이 생길 거 같아유튜브에서 golang 강의를 하나 정주행하게 되었다 소개컴맹을 위한 Go 언어 기초 프로그래밍 기초 강좌 1 - 트랜지스터를 알아보자Tucker 의 프로그래밍 기초 강좌 입니다.기초 이론 부터 차근차근 진행하려 합니다.1강 컴퓨터 원리와 구조 입니다.https://youtu.be/Tq3W8UyltFs 최근에 Tucker의 Go 언어 프로그래밍 라는 책도 발간하신 ( 구매했지만 아직 읽어보진 못했다 )터커님의 유튜브 강의인데 제목에서도 알 수 있듯이초보자들이 입문할 때 듣기 좋은 내용들로 강의가 구성되어 있다 하지만일반적으로 언어 문법에 대해서만 설명서 처럼설명하는 일부 타강의들과는 달리'컴맹을 위한 기초 프로그래밍 ' 치고는..
2021.05.27
-
[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