๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); if(n>=0 && n
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int y = scanner.nextInt(); int x1 = x/y; int y1 = x%y; System.out.println(x1); System.out.println(y1); scanner.close(); } } ๋ฌธ์ œ๋ฅผ ๋ณด๊ณ  ์ œ์ถœ์„ ํ–ˆ๋Š”๋ฐ, ๊ณ„์† ๋Ÿฐํƒ€์ž„ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค. ๋ถ„๋ช… ํ‹€๋ฆด๋ฆฌ๊ฐ€ ์—†๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๊ธฐ ๋•Œ๋ฌธ์—, ๋ฌธ์ œ๋ฅผ ๋‹ค์‹œ ์‚ดํŽด๋ณด์•˜๋‹ค. ๋ฌธ์ œ๋ฅผ ํ™•์ธํ•˜๋‹ˆ ์•„์ฃผ ํฐ ์ˆซ์ž๋ฅผ ๋„ฃ์–ด์•ผํ•œ๋‹ค๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. int, long ๋ณด๋‹ค ํฐ ์ˆ˜๋ฅผ ๋„ฃ์„..
โœจ ๋ฐ์ดํ„ฐ ์ „์ฒ˜๋ฆฌ ๊ณผ์ •(Data Preprocessing Data) ์ฃผ์–ด์ง„ ๋ฐ์ดํ„ฐ๋ฅผ ๊ทธ๋Œ€๋กœ Data mining ํ•˜์ง€ ์•Š๊ณ , ๋ถ„์„ํ•˜๊ธฐ ์ ํ•ฉํ•˜๊ฒŒ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•˜๋Š” ์ž‘์—… โœจ dplyr package ๋ฐ์ดํ„ฐ๋ฅผ ๋นจ๋ฆฌ ๊ฐ€๊ณตํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” package ์ด ํŒจํ‚ค์ง€์˜ ๋‚ด๋ถ€ ํ•จ์ˆ˜๋ฅผ ์•Œ์•„๋ณด๊ณ ์žํ•œ๋‹ค. filter() : ํ–‰ ์ถ”์ถœ select() : ์—ด(variable) ์ถ”์ถœ arrange() : ์ •๋ ฌ mutate() : variable ์ถ”๊ฐ€ summarise() : ํ†ต๊ณ„์น˜ ์‚ฐ์ถœ group_by() : grouping, ์ง‘๋‹จ๋ณ„๋กœ ๋‚˜๋ˆ„๊ธฐ left_join() : ๋ฐ์ดํ„ฐ ํ•ฉ์น˜๊ธฐ(์—ด, variable) bind_rows() : ๋ฐ์ดํ„ฐ ํ–‰(record) ํ•ฉ์น˜๊ธฐ bind_rows()์—์„œ๋Š” ๋ณ€์ˆ˜์˜ ๊ฐœ์ˆ˜์™€ ๋ณ€์ˆ˜์˜ ์ด๋ฆ„์ด ๊ฐ™์•„์•ผํ•œ๋‹ค..
์–ด๋–ค ๋‹จ์ถ•ํ‚ค๋ฅผ ์ž˜๋ชป ๋ˆŒ๋Ÿฌ์„œ file, environment ์ฐฝ์ด ์‚ฌ๋ผ์กŒ์—ˆ๋‹ค. ์ด๋•Œ๋Š” View -> Panes -> Show all Panes ํ˜น์€ Ctrl + Alt+ Shift + 0 ๋‹จ์ถ•ํ‚ค๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ๋œ๋‹ค.
ํ•™๊ต ์ˆ˜์—…์‹œ๊ฐ„์— GUI ๊ทธ๋ฆผํŒ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•˜๋ฉด์„œ Enumeration์— ๋Œ€ํ•ด ๊ณต๋ถ€ํ•˜๋ฉด์„œ, Enum Class method์— ๋Œ€ํ•œ ์ง€์‹์ด ๋ถ€์กฑํ•˜์—ฌ ๊ณต๋ถ€ํ•ด๋ณด๋Š” ์‹œ๊ฐ„์„ ๊ฐ–๊ณ ์ž ํ•œ๋‹ค. panel.selectTool(EnumName.valueOf(e.getActionCommand())); (↑ ์ด๊ฑฐ๋ถ€ํ„ฐ๊ฐ€ ์ดํ•ด๊ฐ€ ์•ˆ๊ฐ”์—ˆ์Œ;;) โœจ ์—ด๊ฑฐ์ฒด(Enumeration Type) ์žฅ์  1. ์—ด๊ฑฐ์ฒด๋ฅผ ๋น„๊ตํ•  ๋•Œ ์‹ค์ œ ๊ฐ’ + ํƒ€์ž… ์ฒดํฌ 2. ์—ด๊ฑฐ์ฒด์˜ ์ƒ์ˆซ๊ฐ’์ด ์žฌ์ •์˜๋˜๋”๋ผ๋„ ๋‹ค์‹œ compile ํ•„์š” ์—†์Œ โœจ values() ํ•ด๋‹น ์—ด๊ฑฐ์ฒด์˜ ๋ชจ๋“  ์ƒ์ˆ˜๋ฅผ ์ €์žฅํ•œ ๋ฐฐ์—ด์„ ์ƒ์„ฑํ•˜์—ฌ ๋ฐ˜ํ™˜ for(Rainbow rainbow; Rainbow.values()){ System.out.println(rainbow); } โœจ valueOf() ์ „๋‹ฌ..
์š”์•ฝ ๋…ธํŠธ, ๊ฐœ๋…์„œ ๋‘๊บผ์šด ๊ฒƒ pdf๋กœ ๋ณด๊ณ  ํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ํ•˜๋‹ค๋ณด๋‹ˆ ์‹œ๊ฐ„์ด ์˜ค๋ž˜๊ฑธ๋ ค์„œ ๋ฐ”๋กœ ํฌ๊ธฐํ•˜๊ณ , ๋…ธ๋žญ์ด๋กœ ๋ฌธ์ œ๋ผ๋„ ์™ธ์›Œ๊ฐ€์ž๊ณ  ์ƒ๊ฐํ•˜๋ฉด์„œ ๊ณต๋ถ€ํ–ˆ๋‹ค. ๊ฑฐ์˜ 1์ฃผ์ผ ์ •๋„ ๋…ธ๋žญ์ด๋งŒ ์„ธ ๋ฒˆ(ํ’€๊ธฐ 2๋ฒˆ, ๋ณต์Šต 1๋ฒˆ) ๋Œ๋ฆฌ๊ณ  ๋ชจ๋ฅด๋Š” ๊ฐœ๋…๋งŒ ์œ ํŠœ๋ธŒ๋กœ ๊ฐ•์˜ ๋“ฃ๊ณ  ํ•ฉ๊ฒฉํ–ˆ๋‹ค. ์ž๊ฒฉ์ฆ ์ค€๋น„ํ•˜๋ฉด์„œ ๋Š๋‚€ ๊ฒƒ์€, ํ•™๊ต ๋‹ค๋‹ˆ๋ฉด์„œ ๋ฐฐ์šด ๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค ์ง€์‹์œผ๋กœ๋Š” ์ž๊ฒฉ์ฆ ๋”ฐ๊ธฐ์—๋Š” ๋ถ€์กฑํ•œ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. SQLD๋Š” ํ˜„์ง์—์„œ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๊ฐœ๋…๋“ค๊ณ  ๊นŠ๊ฒŒ ๋‹ค๋ฃจ๋‹ค๋ณด๋‹ˆ ์ฒ˜์Œ๋ณด๋Š” ๋ช…๋ น์–ด, ๊ฐœ๋…๋“ค์ด ๋งŽ์•˜๋‹ค. ๋‹ค๋ฅธ ์ž๊ฒฉ์ฆ ์ค€๋น„์ž๋ถ„๋“ค์€ ๋…ธ๋žญ์ด ์ฑ…์ด๋ž‘ ์นดํŽ˜์—์„œ ๊ธฐ์ถœ ๋ฌธ์ œ ํ’€์–ด๋ณด๋Š” ์‹์œผ๋กœ ํ–ˆ๋‹ค๊ณ  ํ•˜์…จ๋Š”๋ฐ, ๋…ธ๋žญ์ด๋งŒ ์™„๋ฒฝํ•˜๊ฒŒ ํ•˜๊ณ ๊ฐ€๋„ ํ•ฉ๊ฒฉํ•  ๊ฒƒ ๊ฐ™๋‹ค. (๋…ธ๋žญ์ด์—์„œ ๋ฌธ์ œ ๋˜‘๊ฐ™์€ ๊ฒƒ ๋งŽ์ด ๋‚˜์˜ด.) ์ •๋ณด์™€ ๋ชจ๋ฅด๋Š” ๊ฐœ๋…์— ๋Œ€ํ•œ ํ’€์ด๋Š” ๋ฐ์ดํ„ฐ ํฌ๋Ÿผ ์นด..
โœจ Constructor & Basic Attribute private Node head; private Node tail; private int size; private class Node{ private int value; private Node next; private Node(int data) { this.value = data; this.next = null; } public String toString() { return String.valueOf(this.value); } } ์ œ์ผ ์•ž์— ์žˆ๋Š” ๋…ธ๋“œ, ๋’ค์— ์žˆ๋Š” ๋…ธ๋“œ, size๋ฅผ ์ •์˜ํ•œ๋‹ค. ๋˜ํ•œ ๋…ธ๋“œ๋ฅผ ๋‚ด๋ถ€ class๋กœ ์ƒ์„ฑํ•˜์—ฌ contructor๋กœ ๊ฐ์ฒด ์ƒ์„ฑ ์‹œ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค. โœจ addFirst(int data) public vo..
๋“œ๋””์–ด ๋ธ”๋กœ๊ทธ์— ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ ๊ธ€์„ ์“ด ์ด์œ ,, LinkedList์— ๋Œ€ํ•ด์„œ ์„ค๋ช…ํ•ด๋ณด๊ณ ์ž ํ•œ๋‹ค. ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๊ฒƒ์€ ์—ฐ๊ฒฐ์ด ๋ฌด์—‡์ธ๊ฐ€, ํ”„๋กœ๊ทธ๋ž˜๋ฐ์œผ๋กœ ํ‘œํ˜„ํ•˜๋Š”๊ฐ€? cpu: ๊ณ„์‚ฐํ•˜๊ณ  ์—ฐ์‚ฐ, ์ฒ˜๋ฆฌ ์†๋„๊ฐ€ storage, memory, cpu ์ค‘์— ๊ฐ€์žฅ ๋น ๋ฆ„ storage: HDD, SSD ํŒŒ์ผ, ๋ฐ์ดํ„ฐ ๋“ฑ์„ ์ €์žฅ, ๊ฐ€๊ฒฉ์ด ์ €๋ ด, ์šฉ๋Ÿ‰์ด ํฌ๊ณ , ๋น„ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ ๋ฉ”๋ชจ๋ฆฌ: ๊ธฐ์–ต์„ ๋‹ด๋‹น, ์šฉ๋Ÿ‰์ด ์•„์ฃผ ์ ์Œ, ํœ˜๋ฐœ์„ฑ ๋ฉ”๋ชจ๋ฆฌ, storage ๋ณด๋‹ค ํ›จ์”ฌ ๋” ๋น ๋ฅด๊ฒŒ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Œ. cpu๊ฐ€ storage์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ๋‹ค๊ฐ€ ์“ฐ๊ฒŒ ๋˜๋ฉด ์‹œ๊ฐ„์ด ์˜ค๋ž˜๊ฑธ๋ฆฌ๋Š” ๋‹จ์ ์ด ์žˆ๋‹ค. cpu๊ฐ€ ๊ณ„์‚ฐ์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” storage์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋“ค์„ memory๋กœ ๊ฐ€์ ธ์˜จ ๋‹ค์Œ์— memory๊ฐ€ cpu์—๊ฒŒ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๋Š”๊ฒŒ ๋น ๋ฅด..
ArrayList๋ฅผ ์ง์ ‘ ์ฝ”๋“œ๋ฅผ ๊ตฌํ˜„ํ•˜์—ฌ int ํ˜• ArrayList๋ฅผ ๋‚˜ํƒ€๋‚ด ๋ณด๊ณ ์ž ํ•œ๋‹ค. โœจ Constructor & Basic Attribute private int[] elementData; // ๊ฐ’ ๋„ฃ์„ ๊ณณ private int size; // arraylist size private int currentCapacity; // ํ˜„์žฌ arraylist ํฌ๊ธฐ private int initCapacity = 10; // ์ตœ์ดˆ arraylist ํฌ๊ธฐ //constructor public MyArrayList() { this.elementData = new int[initCapacity]; this.size = 0; this.currentCapacity = initCapacity; } ๊ฐ’ ๋„ฃ์„ eleme..
โœจ ArrayList ๋‚ด๋ถ€์ ์œผ๋กœ ๋ฐฐ์—ด์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ โœจ ArrayList Insert & Delete arrayList.add(10); arrayList.add(20); arrayList.add(30); arrayList.add(40); 20 ์ž๋ฆฌ์— 50์„ ๋„ฃ๊ณ  ์‹ถ๋‹ค๋ฉด, ๋งจ ๋’ค์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ถ€ํ„ฐ ์ฐจ๋ก€๋Œ€๋กœ ๋’ค๋กœ ์ด๋™ํ•˜์—ฌ ์ž๋ฆฌ๋ฅผ ๋งŒ๋“  ํ›„ 50์˜ ๊ฐ’์„ ๋„ฃ๋Š”๋‹ค. -> ์‚ญ์ œ๋„ ์ด์™€ ๋งˆ์ฐฌ๊ฐ€์ง€ โœจ ArrayList Get ๋ฐ์ดํ„ฐ๋ฅผ ์ฐจ๋ก€๋Œ€๋กœ ์ €์žฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ์ดํ„ฐ์˜ ์œ„์น˜๋ฅผ ์•Œ๊ณ  ์žˆ์Œ. index๋ฅผ ์ด์šฉํ•˜์—ฌ List์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋น ๋ฅด๊ฒŒ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค . โœจ ArrayList Pros and Cons [์žฅ์ ] ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ฌ ๋•Œ ๋น ๋ฅด๊ฒŒ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Œ [๋‹จ์ ] ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์‚ญ์ œํ•˜๋ฉด ํ•˜๋‚˜์”ฉ ๋‹ค ์˜ฎ๊ฒจ์•ผํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์‹œ๊ฐ„์ด..
chaerlo127
'๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (7 Page)