목록2026/01/02 (2)
컴퓨터공학 💻 도서관📚
[ 수정 후 ] [ 수정 전 ] package tmp;import javax.swing.*;import java.awt.*;import java.util.concurrent.*;public class TimerAlertApp extends JFrame { private JTextField timeField; private JButton startButton; private JLabel remainingTimeLabel; private ScheduledExecutorService scheduler; // ScheduledExecutorService 는 인터페이스다 private int remainingSeconds; public TimerAlertApp() { ..
평균 수행 시간이 O(n^2)인 알고리즘버블 정렬(Bubble Sort), 삽입 정렬(Insertion Sort), 선택 정렬(Selection Sort)각 요소가 다른 요소와 평균 한번 이상씩 비교를 하여 정렬 됨 삽입정렬import java.util.Iterator;import java.util.Scanner;import java.io.*;import OOP.Order;public class Main { public static void main(String[] args) { int[] arr = {80, 50, 70, 10, 60, 20, 40, 30 }; for (int i=1; i 0) && arr[j-1] > save){ // 실수 : arr[j-1] > sa..
