This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Solution { | |
| /*** | |
| * | |
| *inputString result | |
| * Hello, world! 0 | |
| * line [plus] 1 | |
| * if (Count of eggs is 4.) {Buy milk.} 2 | |
| * >_< -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Solution { | |
| // 진행 패턴: 열린 괄호 갯수 >= 닫는 괄호 갯수 | |
| /*** | |
| * 상황에 따라 if와 else if 그리고 if와 if로 나누어질 수 있음 | |
| * MECE 방식: if, else if, else / 모든 경우 체크: if와 if | |
| * | |
| */ | |
| public List<String> generateParenthesis(int n){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| /* | |
| 1. 분기의 순서를 유의할 것. | |
| E.G., A 분기점에서 나와야 할 것이 B 분기점이 먼저 위치하여 A 분기점의 로직이 안나옴 | |
| A: if(tmp == M) / B: (start > N) | |
| 2. 백트랙, 스택 등 노드 이동 단계 별 depth 또는 cnt를 가감 방식으로 발상할 것 | |
| AS-IS: 초기화 방식. tmp = 0 | |
| TO-BE: 가감 방식. tmp-- or tmp++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| /* | |
| 1. 분기의 순서 | |
| 2. tmp = 0이 아니라 tmp++ or tmp--으로 발상 | |
| */ | |
| class Main{ | |
| public static Stack<Integer> stack; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| public class Main { | |
| /* | |
| 4 4 | |
| 1 2 3 4 | |
| 1 2 4 3 | |
| 1 3 2 4 | |
| 1 3 4 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| public class Main { | |
| /* | |
| 4 2 | |
| 1 2 | |
| 1 3 | |
| 1 4 | |
| 2 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| public class Main { | |
| /* | |
| 5 | |
| 55 185 | |
| 58 183 | |
| 88 186 | |
| 60 175 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TO_CHAR(SALES_DATE, 'YYYY-MM') YYYYMM | |
| ,COUNT(*) COUNT | |
| FROM ORA_USER.SALES | |
| GROUP BY TO_CHAR(SALES_DATE, 'YYYY-MM') | |
| ORDER BY 1 | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TO_CHAR(SALES_DATE, 'YYYY-MM') YYYYMM | |
| ,COUNT(*) COUNT | |
| FROM ORA_USER.SALES | |
| GROUP BY TO_CHAR(SALES_DATE, 'YYYY-MM') | |
| ORDER BY 1 | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.Arrays; | |
| import java.util.StringTokenizer; | |
| /* | |
| 216 | |
| 198 | |
| */ | |
| public class Main{ | |
| public static void main(String argv[]) throws IOException { |
NewerOlder