This file contains 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.Scanner; | |
/** | |
* 순차탐색 알고리즘 1 (Sequential Search 1) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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.Scanner; | |
/** | |
* 순차탐색 알고리즘 2 (Sequential Search 2) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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
/** | |
* 이진탐색 알고리즘 (Binary Search) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; | |
int key = 7; | |
int start = 0; |
This file contains 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.Scanner; | |
/** | |
* 유클리드 최대공약수 알고리즘 1 (Euclid GCD 1) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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.Scanner; | |
/** | |
* 유클리드 최대공약수 알고리즘 2 (Euclid GCD 2) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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.Scanner; | |
/** | |
* 유클리드 최대공약수를 이용한 최소공배수 알고리즘 (Euclid LCM By Using GCD) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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.Scanner; | |
/** | |
* 소수판별 1 (Check Prime Number 1) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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.Scanner; | |
/** | |
* 소수판별 2 (Check Prime Number 2) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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
/** | |
* 에라토네스의 체를 이용한 1부터 1000000까지 소수구하기 (Find Prime Number Between 1 and 1000000 By Using Sieve of Eratosthenes) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
final int LIMIT = 1000000; | |
int[] sieve = new int[LIMIT + 1]; | |
sieve[0] = 1; |
This file contains 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
/** | |
* 합병정렬 알고리즘 (Merge Sort) | |
* | |
* @author devetude | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
int[] arr = { 9, 3, 1, 2, 8, 6, 5, 7, 4 }; | |
mergeSort(arr); |
OlderNewer