diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..305deb8
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..0df9019
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ codingTest
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..bb5f665
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/codingTest/module.java=UTF-8
+encoding//src/codingTest/module2.java=UTF-8
+encoding//src/codingTest/module3.java=UTF-8
diff --git a/README.md b/README.md
deleted file mode 100644
index 4d49392..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# codingTest
\ No newline at end of file
diff --git a/bin/codingTest/Animal.class b/bin/codingTest/Animal.class
new file mode 100644
index 0000000..e39fcc6
Binary files /dev/null and b/bin/codingTest/Animal.class differ
diff --git a/bin/codingTest/Eatable.class b/bin/codingTest/Eatable.class
new file mode 100644
index 0000000..55b3850
Binary files /dev/null and b/bin/codingTest/Eatable.class differ
diff --git a/bin/codingTest/Person.class b/bin/codingTest/Person.class
new file mode 100644
index 0000000..ab2460a
Binary files /dev/null and b/bin/codingTest/Person.class differ
diff --git a/bin/codingTest/Solution.class b/bin/codingTest/Solution.class
new file mode 100644
index 0000000..f4e92cd
Binary files /dev/null and b/bin/codingTest/Solution.class differ
diff --git a/bin/codingTest/module3.class b/bin/codingTest/module3.class
new file mode 100644
index 0000000..29101c2
Binary files /dev/null and b/bin/codingTest/module3.class differ
diff --git a/bin/module-info.class b/bin/module-info.class
new file mode 100644
index 0000000..845d9c6
Binary files /dev/null and b/bin/module-info.class differ
diff --git a/src/codingTest/Animal.java b/src/codingTest/Animal.java
new file mode 100644
index 0000000..0b78378
--- /dev/null
+++ b/src/codingTest/Animal.java
@@ -0,0 +1,10 @@
+package codingTest;
+
+public abstract class Animal {
+
+ public static String str12 = "3";
+
+ String talk() {
+ return "talktalktalk";
+ }
+}
diff --git a/src/codingTest/Eatable.java b/src/codingTest/Eatable.java
new file mode 100644
index 0000000..427e5c0
--- /dev/null
+++ b/src/codingTest/Eatable.java
@@ -0,0 +1,8 @@
+package codingTest;
+
+public interface Eatable {
+
+ String str1 = "1";
+
+ String eat();
+}
diff --git a/src/codingTest/Person.java b/src/codingTest/Person.java
new file mode 100644
index 0000000..3351e7e
--- /dev/null
+++ b/src/codingTest/Person.java
@@ -0,0 +1,12 @@
+package codingTest;
+
+public class Person implements Eatable {
+
+ @Override
+ public
+ String eat() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/src/codingTest/module.java b/src/codingTest/module.java
new file mode 100644
index 0000000..c3d7948
--- /dev/null
+++ b/src/codingTest/module.java
@@ -0,0 +1,1305 @@
+package codingTest;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.PriorityQueue;
+import java.util.Queue;
+import java.util.Set;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+
+class Card{
+ static int cnt;
+ int data;
+ Card(int data){
+ this.data = data;
+ cnt++;
+ }
+}
+
+public class module {
+
+// public static void main(String[] args) {
+//
+// //문제풀이 기본 양식
+// Solution s = new Solution();
+// String[] answer = {};
+//
+//
+// //String[] rooms= {"[403]James", "[404]Azad,Louis,Andy", "[101]Azad,Guard"};
+// //String[] rooms= {"[101]Azad,Guard", "[202]Guard", "[303]Guard,Dzaz"};
+// String[] rooms= {"[1234]None,Of,People,Here", "[5678]Wow"};
+// int target = 1234;
+//
+//// System.out.println(s.solution11(new String[] {"I 16","D 1"}));
+//// System.out.println(s.solution11(new String[] {"I 16", "I -5643", "D -1", "D 1", "D 1", "I 123", "D -1"}));
+// System.out.println(s.solution13(12,6));
+//
+//// answer = s.solution("JEROEN");
+//// System.out.println(" answer : " + answer);
+//
+//
+// //answer = s.solution(new String[]{"spy","ray","spy","room","once","ray","spy","once"} );
+//// answer = s.solution(new String[]{"spy","ray","spy","room","once","ray","spy","once", "room"} );
+//// System.out.println(" answer : " + answer);
+//// Arrays.stream(answer).forEach(t -> System.out.println(t));
+////
+//// int ans = 0;
+//// ans = s.solution00(new int[] {20,40,65,110}, 30);
+//// System.out.println(ans);
+//
+// //
+//
+//
+//
+//
+// //dfs, bfs
+//// Scanner sc = new Scanner(System.in);
+//// int n = sc.nextInt();
+//// int m = sc.nextInt();
+//// int start = sc.nextInt();
+//// a = (ArrayList[]) new ArrayList[n+1];
+//// for (int i=1; i<=n; i++) {
+//// a[i] = new ArrayList();
+//// }
+//// for (int i=0; i true); //Stream filter
+ //Stream filter 처리 후 list 변환
+ //ArrayList alreadyRankUser = (ArrayList) rankList.stream().filter(t -> t[0].equals(userName) && Integer.parseInt(t[1]) >= userScore).collect(Collectors.toList());
+
+ //===========================================================
+
+
+ List list = new ArrayList();
+
+
+ list.add(new Integer[][] {{1,3}});
+
+ //arrayList
+ List list1 = new ArrayList();
+ int index = 0;
+ list1.add(index, 0);
+ list1.remove(index);
+ for (Integer integer : list1) {
+ System.out.println(integer);
+ }
+
+
+ //===========================================================
+
+ //map 선언
+ HashMap map = new HashMap();
+
+ HashMap> ma2 = new HashMap>();
+
+ //ma2.put("aa", new List);
+
+ for(String key : map.keySet()) {
+
+ }
+
+ //===========================================================
+
+ //Stack
+ Stack stack = new Stack();
+ stack.add(null); //넣기
+ stack.empty(); //비었는지 확인
+ stack.peek(); //stack 최상단 값
+ stack.pop(); //stack 빼기
+
+ //Queue
+ Queue queue = new LinkedList<>();
+ queue.add(null); //넣기
+ queue.isEmpty(); //비었는지 확인
+ queue.peek(); //queue 나올 값
+ queue.poll(); //queue 빼기
+
+
+ //기타
+ //int[] 를 integer[]로 바꾸는 방법
+ Integer[] arr2 = Arrays.stream( arr ).boxed().toArray( Integer[]::new );
+
+ //forEach 구문
+ Arrays.stream(arr).forEach(s -> System.out.println(s));
+
+ //한글자씩 split -- 파라미터 ""로
+ String str = "12345";
+ String[] result = str.split("");
+
+ //binarySearch
+ Arrays.binarySearch(result, "1");
+ PriorityQueue q = new PriorityQueue();
+
+ //정렬
+ /*
+ String[] result = new String[numbers.length];
+ for (int i = 0; i < numbers.length; i++) {
+ result[i] = String.valueOf(numbers[i]);
+ }
+ // 정렬
+ Arrays.sort(result, new Comparator() {
+ @Override
+ public int compare(String o1, String o2) {
+ return ((o2 + o1).compareTo(o1 + o2));
+ }
+ });
+ */
+
+
+ }
+ public static boolean isPrime(int num){
+ for(int i=2; i<=num/2; i++){
+ if(num % i == 0) return false;
+ }
+ return true;
+ }
+
+
+ static ArrayList[] a;
+ static boolean[] c;
+ public static void dfs(int x) {
+ if (c[x]) {
+ return;
+ }
+ c[x] = true;
+ System.out.print(x + " ");
+ for (int y : a[x]) {
+ if (c[y] == false) {
+ dfs(y);
+ }
+ }
+ }
+ public static void bfs(int start) {
+ Queue q = new LinkedList();
+ q.add(start);
+ c[start] = true;
+ while (!q.isEmpty()) {
+ int x = q.remove();
+ System.out.print(x + " ");
+ for (int y : a[x]) {
+ if (c[y] == false) {
+ c[y] = true;
+ q.add(y);
+ }
+ }
+ }
+ }
+
+ public boolean BinarySearch(int []arr, int len, int key){
+ int start = 0;
+ int end = len-1;
+ int mid;
+
+ while(end - start >= 0) {
+ mid = (start + end) / 2; //중앙 값
+
+ if (arr[mid] == key) { //key값을 찾았을때
+ return true;
+
+ } else if (arr[mid] > key) { //key값이 mid의 값보다 작을때 (왼쪽으로)
+ end = mid - 1;
+
+ } else { //key값이 mid의 값보다 클때 (오른쪽으로)
+ start = mid + 1;
+
+ }
+ }
+ return false;
+ }
+}
+
+
+
+
+
+
+
+class Solution {
+
+ /**
+ *
+ * @author hs
+ * @스택 - 주식 가격...... 얘 잘 모르겟다
+ *
+ */
+ public int[] solution1(int[] prices) {
+
+ Stack stack = new Stack<>();
+ int[] ret = new int[prices.length];
+
+ for (int i = prices.length - 2; i >= 0; i--) {
+ int day = 0;
+
+ while (!stack.isEmpty() && stack.peek()[0] >= prices[i]) {
+ day += stack.pop()[1];
+ }
+
+ ret[i] = stack.push(new Integer[]{prices[i], day + 1})[1];
+ }
+
+ return ret;
+ }
+
+ public int solution2(int bridge_length, int weight, int[] truck_weights) {
+
+ int answer = 0;
+
+ Queue queue = new LinkedList<>();
+ int currentWeight = 0;
+
+ for(int t: truck_weights){
+ while(true) {
+ if(queue.isEmpty()){
+ queue.add(t);
+ currentWeight += t;
+ answer++;
+ break;
+ } else if(queue.size() == bridge_length){
+ currentWeight -= queue.poll();
+ } else {
+ if(currentWeight + t > weight){
+ queue.add(0);
+ answer++;
+ } else {
+ queue.add(t);
+ currentWeight+=t;
+ answer++;
+ break;
+ }
+ }
+ }
+ }
+ answer = answer + bridge_length;
+
+ return answer;
+ }
+
+ public int solution3(int[] A , int[] B) {
+ int answer = 0;
+
+ Arrays.sort(A);
+ Integer[] arr = Arrays.stream( B ).boxed().toArray( Integer[]::new );
+
+ List list = Arrays.asList(arr);
+
+ Arrays.sort(arr, Collections.reverseOrder());
+ for (int i = 0; i < B.length; i++) {
+ B[i] = arr[i];
+ System.out.println(B[i]);
+ }
+
+ for(int i = 0; i< A.length; i++){
+ answer += (A[i] * B[i]);
+ }
+
+ return answer;
+ }
+
+ public String solution4(String s) {
+
+ String answer = "";
+
+ String[] stringArr = s.split(" ");
+
+ int max = Integer.MIN_VALUE;
+ int min = Integer.MAX_VALUE;
+
+ for(String str: stringArr) {
+ int num = 0;
+
+ if(str.contains("-")) {
+ num = (-1) * Integer.parseInt(str.replace("-", ""));
+ } else {
+ num = Integer.parseInt(str);
+ }
+
+ if(num > max) {
+ max = num;
+ }
+
+ if(num < min) {
+ min = num;
+ }
+ }
+
+ return answer;
+ }
+
+ public String[] solution5(String[] record) {
+
+ HashMap uidMap = new HashMap();
+
+ String[] answer = {};
+ String answerStream = "";
+ for(String str : record) {
+ String[] messageContent = str.split(" ");
+ String postFix = "";
+ if(messageContent[0].equals("Leave")){
+ postFix = "나갔습니다.";
+ } else if(messageContent[0].equals("Change")) {
+ uidMap.replace(messageContent[1], messageContent[2]);
+ } else {
+ postFix = "들어왔습니다.";
+ uidMap.put(messageContent[1], messageContent[2]);
+ }
+
+ if(!messageContent[0].equals("Change")) {
+ answerStream += messageContent[1]+"님이 "+ postFix + ", ";
+ }
+ }
+
+ for( String key : uidMap.keySet() ){
+ System.out.println(uidMap.get(key));
+ System.out.println(answerStream);
+ String reg = key.toString();
+ answerStream.replaceAll(key, uidMap.get(key));
+ }
+
+ answer = answerStream.split(",");
+
+ return answer;
+ }
+
+ public int[] solution6(int m, int n, int[][] picture) {
+ int numberOfArea = 0;
+ int maxSizeOfOneArea = 0;
+ TreeMap map = new TreeMap<>();
+
+ int[] answer = new int[2];
+ answer[0] = numberOfArea;
+ answer[1] = maxSizeOfOneArea;
+
+ for(int x = 0; x < m; x++) {
+ for(int y = 0; y < n; y++) {
+
+ if(picture[x][y] != 0) {
+
+ }
+ }
+ }
+
+
+ return answer;
+ }
+
+ public String solution7(String number, int k) {
+
+ String answer = "";
+ String[] arr = number.split("\\[0-9]{1}");
+
+ Arrays.stream(arr).forEach(s -> System.out.println(s));
+
+
+ return answer;
+ }
+
+ public int solution8(String s) {
+ int answer = 0;
+
+ HashMap aMap = new HashMap<>();
+ String[] str = s.split("");
+
+ for(int i = 0; i < str.length ; i++) {
+ if(!aMap.containsKey(str[i])) {
+ aMap.put(str[i], 0);
+ } else {
+ aMap.replace(str[i], aMap.get(str[i]) +1 );
+ }
+ }
+
+ for(String key : aMap.keySet()) {
+ if(aMap.get(key) % 2 == 1) {
+ answer++;
+ }
+ }
+
+ System.out.println(answer);
+ return answer;
+ }
+
+ public String solution9(int n) {
+ String answer = "";
+ String[] str = new String[3];
+ int[] b = new int[9999999];
+ str[0] = "4";
+ str[1] = "1";
+ str[2] = "2";
+
+ int i = 0;
+ while(n > 0){
+ int remainder = n % 3;
+ n /= 3;
+
+ if(remainder == 0) n--;
+
+ answer += str[remainder] + answer;
+ }
+
+ return answer;
+ }
+
+ public int solution10(int n) {
+ int answer = 0;
+
+ int[] clapChecker = new int [n+1];
+
+ for(int i = 1 ; i <= n; i++) {
+ String v = Integer.toString(i);
+ System.out.println(i+" : " + v.matches(".*[369].*"));
+
+ if(v.matches(".*[369].*")) {
+ clapChecker[i] = 1;
+ } else {
+ clapChecker[i] = 0;
+ }
+ }
+
+ answer = Arrays.stream(clapChecker).sum();
+
+ return answer;
+ }
+
+ public int solution11(int[] success) {
+ int answer = Integer.MAX_VALUE;
+ HashMap map = new HashMap();
+
+ for(int i = 0; i < success.length; i++) {
+ if(map.containsKey(Integer.toString(success[i]))) {
+ int[] org = map.get(Integer.toString(success[i]));
+ if(org[1] == -1) {
+ org[1] = i;
+ map.replace(Integer.toString(success[i]), org);
+ }
+ } else {
+ map.put(Integer.toString(success[i]), new int[] {i,-1});
+ }
+ }
+
+ for (String key : map.keySet()) {
+ int[] a = map.get(key);
+ System.out.println(key + " / " + a[0] + ": "+ a[1]);
+ if(a[1] != -1) {
+ answer = answer > a[1]-a[0] == true ? a[1] - a[0] : answer;
+ }
+ }
+
+ if(answer == Integer.MAX_VALUE) {
+ answer = -1;
+ }
+
+ return answer;
+ }
+
+ public int solution99(int k, String[] user_scores) {
+
+ int answer = 0;
+
+ LinkedList rankList = new LinkedList();
+ String[] snapShot = new String[k];
+ for(int i = 0; i < k; i++) {
+ rankList.add(new String[] {" ","0"});
+ }
+
+ //K는 1이상 100이하인 자연수
+ //user_scores의 길이는 1 이상 1000 이하
+ //user_scores -> 닉네임 점수
+ //바뀐다 -> 닉네임
+ int z = 0;
+ for(String s : user_scores) {
+ //랭크 정보 변경 전 스냅샷
+ for(int i = 0; i < k; i++) {
+ String[] rankUser = rankList.get(i);
+ snapShot[i] = rankUser[0].toString();
+ }
+
+ //읽어들인 유저 정보 스캔
+ String[] user = s.split(" ");
+ String userName = user[0];
+ int userScore = Integer.parseInt(user[1]);
+
+ if(rankList.size() == 0) {
+ rankList.add(user);
+ } else {
+ for(int i = 0; i < k; i++) {
+ String[] rankUser = rankList.get(i);
+ int rankUserScore = Integer.parseInt(rankUser[1]);
+
+ if(rankUserScore < userScore) {
+
+ //랭크에 이미 있는 경우 -> 구 랭크를 지워준다.
+ boolean needRemove = false;
+ int removeIndex = -1;
+ for(int j = 0; j < k; j++) {
+ String[] tmpUser = rankList.get(j);
+ int tmpRankUserScore = Integer.parseInt(tmpUser[1]);
+
+
+ if(tmpUser[0].equals(userName) && tmpRankUserScore < userScore) {
+ needRemove = true;
+ removeIndex = j;
+ break;
+ }
+ }
+
+ if(needRemove) {
+ //System.out.println("needRemove" + removeIndex);
+ rankList.remove(removeIndex);
+ rankList.add(i, user);
+ } else {
+ ArrayList alreadyRankUser = (ArrayList) rankList.stream().filter(t -> t[0].equals(userName) && Integer.parseInt(t[1]) >= userScore).collect(Collectors.toList());
+
+ //alreadyRankUser.forEach((t) -> {System.out.println(t[0]);});
+ if(alreadyRankUser.size() == 0) {
+ rankList.add(i, user);
+ }
+ }
+ //rankList.remove(k);
+ break;
+ }
+ }
+
+ }
+
+ //랭크 정보 변경 전 스냅샷
+ for(int i = 0; i < k; i++) {
+ String[] rankUser = rankList.get(i);
+ if(!snapShot[i].equals(rankUser[0].toString())) {
+ answer++;
+ break;
+ }
+ }
+// System.out.println("========================= i : " + z++);
+// rankList.forEach((t) -> {
+// System.out.println(t[0] + "/ "+ t[1]);
+// });
+//
+//
+// System.out.println("=========================");
+//
+ }
+
+ return answer;
+ }
+
+ //정렬
+ public String solution13(int[] numbers) {
+
+ // 숫자를 문자열로 변환
+ String[] result = new String[numbers.length];
+ for (int i = 0; i < numbers.length; i++) {
+ result[i] = String.valueOf(numbers[i]);
+ }
+
+ // 정렬
+ Arrays.sort(result, new Comparator() {
+
+ @Override
+ public int compare(String o1, String o2) {
+ System.out.println((o2 + o1).compareTo(o1 + o2));
+ return ((o2 + o1).compareTo(o1 + o2));
+ }
+ });
+
+ // 0만 여러개 있는 배열의 경우 하나의 0만 리턴
+ if(result[0].equals("0")) {
+ return "0";
+ }
+
+ String answer = "";
+ // 정렬된 문자 하나로 합치기
+ for (String a : result) {
+ answer += a;
+ }
+ return answer;
+
+ }
+
+ public int solution14(int[] people, int limit) {
+
+ //구명보트 앞뒤로 태우기 ----- 탐욕법
+ int answer = 0;
+
+ Arrays.sort(people);
+
+ int right = people.length - 1;
+ int left = 0;
+
+ while (right >= left) {
+ int weight = people[right--];
+ if (weight + people[left] <= limit) {
+ left++;
+ }
+ answer++;
+ }
+
+ return answer;
+ }
+
+ public int solution15(String name) {
+ int answer = 0;
+ String[] arr = name.split("");
+ int[] resetStack = {1,2,3,4,5,6,7,8,9,10,11,12,13,13,12,11,10,9,8,7,6,5,4,3,2,1};
+ int currentPoint = 0;
+
+ for(int i = 0; i < arr.length ; i++) {
+ int targetPoint = arr[i].codePointAt(0)-65;
+ System.out.println("move To :" + arr[i]);
+ System.out.println(Math.abs(targetPoint-currentPoint));
+ System.out.println(resetStack[targetPoint]);
+ answer += Math.min(Math.abs(targetPoint-currentPoint), resetStack[targetPoint]);
+ if(i != arr.length-1) {
+ answer++;
+ }
+ }
+
+ return answer;
+ }
+
+
+ public String[] solution(String[] movie) {
+
+ String[] ans = {};
+ HashMap map = new HashMap();
+
+ for (String m : movie) {
+ if(map.containsKey(m)) {
+ Integer orgCount = map.get(m);
+ map.replace(m, orgCount+1);
+ } else {
+ map.put(m, 1);
+ }
+ }
+
+ List tmpList = new ArrayList();
+
+ tmpList.addAll(map.keySet());
+
+ Collections.sort(tmpList,new Comparator