일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
- anr
- db
- 너비우선탐색
- BFS
- java
- support fragment
- 안드로이드 DBMS
- 안드로이드 AdapterView
- 자바 컬렉션
- application not responding
- 안드로이드
- 컬렉션
- support 라이브러리
- 소수
- Github
- 백준 알고리즘
- 소수 알고리즘
- android fragment
- 안드로이드 파일
- 백준
- android adapterview
- 액티비티 ANR
- android support
- 알고리즘
- 자료구조
- oracle
- 안드로이드 ANR
- SQLite와 Realm 차이점
- 깊이우선탐색
- DFS
- Today
- Total
목록2018/09 (17)
밍의 기록들😉
그래프(Graph) 정점 6개, 간선 8개방향이 없는 그래프정점 : {1, 2, 3, 4, 5, 6}간선 : {(1, 2), (1, 5), (2, 5), (2, 3), (3, 4), (2, 4), (4, 5), (4, 6)} 그래프의 구현 : 인접행렬정점의 개수를 V라고 했을 때V x V 크기의 2차원 배열을 이용정점의 연결관계를 0과 1로 표현A[i][j] = 1(연결이 되어있을 때), 0(연결이 되어있지 않을 때)양방향 그래프일 경우 A[i][j] = A[j][i] 구현 코드import java.util.Scanner; public class AdjacencyMatrix { public static void main(String[] args) { Scanner sc = new Scanner(Syste..
그래프(Graph)자료구조의 일종정점(Node, Vertex)간선(Edge) : 정점간의 관계를 나타냄G = (V,E)로 나타냄 경로(Path)정점 A에서 B로 가는 경로A-> C -> D -> E -> BA -> BA -> C -> BA -> C -> E -> B 사이클(Cycle)정점 A에서 다시 A로 돌아오는 경로A-> C -> B -> AA -> C -> E -> B -> AA -> C -> D -> E -> B -> A 단순 경로와 단순 사이클경로/사이클에서 같은 정점을 두 번 이상 방문하지 않는 경로/사이클특별한 말이 없으면, 일반적으로 사용하는 경로와 사이클은 단순 경로/사이클을 말함 방향 있는 그래프A -> C와 같이 간선에 방향이 있음A -> C는 있지만, C-> A는 없음 방향 없는 그..
문제 https://www.acmicpc.net/problem/2529 소스코드import java.util.Scanner; public class Inequel2 { private static int n; private static String[] op; private static int[] a = new int[10]; private static boolean[] check = new boolean[10]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); op = sc.nextLine().split(" "); descCompare(0, 9); print(); check = new..
문제 https://www.acmicpc.net/problem/2606 소스코드import java.util.Scanner; public class Virus { private static int v; public static void main(String[] args) { Scanner sc = new Scanner(System.in); v = sc.nextInt(); // node, vertex int e = sc.nextInt(); // edge sc.nextLine(); int[][] graph = new int[v][v]; int[] check = new int[v]; for(int i=0; i
큐(Queue)의 개념 한쪽에서는 삽입 작업이 이루어지고 다른 한쪽에서는 삭제 작업이 이루어지도록 구성한 자료구조 (선형 자료 구조) 가장 먼저 삽입된 자료가 가장 먼저 삭제되는 선입선출(FIFO; First In First Out) 방식으로 자료를 처리 큐(Queue)의 에러큐 오버플로우 : 큐의 모든 기억장소가 꽉 채워져 있는 상태이므로 더 이상 자료를 삽입할 수 없을 때 발생큐 언더플로우 : 큐에 제거할 자료가 없을 때 발생 큐(Queue)의 연산 시작과 끝을 표시하는 두 개의 포인터가 있는데, 프런트(F, Front)는 가장 먼저 삽입된 자료의 기억공간을 가리키는 포인터이며 삭제 작업을 할 때 사용한다. 리어(R, Rear)는 가장 마지막에 삽입된 자료가 위치한 기억공간을 가리키는 포인터이며 삽입..
문제 소스코드import java.util.Scanner; public class Tobin { private static int N; private static int K; public static int[] ans = new int[30]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); K = sc.nextInt(); tobin(N, K, 0); } // n자릿수 1이 k개인 경우의 수 private static void tobin(int n, int k, int index) { if(N == index){ // 인덱스가 자릿수만큼 채워질 경우 출력 for(int i=0; i0..
문제 소스코드 import java.util.Scanner; public class Division2 { private static int N; private static int cnt = 0; static int[] array = new int[20]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); division(N, 0, 0); System.out.println(cnt); } private static void division(int n, int sum, int index) { for(int x=n; x>0; x--){ if(index==0){ // 처음 시작 숫자 array..