*tip: Linked List, Queue, Stack 직접 실행하면서 이해하는 사이트
import java.util.LinkedList;  //Queue 사용을 위해 Linked List를 사용한다. 
import java.util.Queue; //Queue import
class Main {
  public static void main(String[] args) {
    Queue<Integer> queueInt = new LinkedList<Integer>(); // Integer 형 queue 선언
    Queue<String> queueStr = new LinkedList<String>(); //Stigng queue 선언
    queueInt.add(1); //큐에 첫 번째 값 넣기 
    queueInt.offer(2); //큐에 두 번째 값 넣기
    queueInt.offer(5); //큐에 세 번째 값 넣기  //Enqueue
    System.out.println(queueInt); // [1,2,5]
    queueInt.poll(); //첫 번째 값 삭제 [2,5]
    queueInt.remove(); //첫 번째 값 삭제 [5] //Dequeue
    
    queueInt.peek(); //큐의 첫번째 값 참조
  
  }
}
- 프로세스 관리
- 너비 우선 탐색 구현
- 주문 처리 과정
- 메세지 처리기
import java.util.Stack; //stack import
class Main {
  public static void main(String[] args) {
    
    Stack<Integer> stackInt = new Stack<Integer>(); //Integer 형 스택 생성
    stackInt.push(1); //첫 번째 값 입력
    stackInt.push(2); //두 번째 값 입력
    stackInt.push(3); //세 번째 값 입력
    System.out.println(stackInt); //[1,2,3]
    stackInt.pop(); //마지막에 들어왔던 값부터 빠진다.
    System.out.println(stackInt); //[1,2]
    stackInt.pop();
    System.out.println(stackInt); //[1]
    stackInt.pop();
    System.out.println(stackInt); //[]
  }
}
- 웹 브라우저 방문 기록 (뒤로 가기)
- ctrl+z (undo) 실행 취소
import java.util.LinkedList; //LinkedList import
class Main {
  public static void main(String[] args) {
    LinkedList<Integer> linkedlistInt = new LinkedList<Integer>(); //Integer 연결리스트 생성
    LinkedList<String> linkedlistStr = new LinkedList<String>();
    
    linkedlistInt.add(3); //순서대로 데이터 3 추가
    linkedlistInt.addFirst(1); //가장 앞에 1 추가
    System.out.println(linkedlistInt); //[1,3]
    
    linkedlistInt.addLast(5); //가장 뒤에 5 추가
    System.out.println(linkedlistInt); //[1,3,5]
    linkedlistInt.add(1,10); //1번 인덱스에 10 추가
    System.out.println(linkedlistInt); //[1,10,3,5]
    linkedlistStr.add("일번");
    linkedlistStr.add("삼번");
    linkedlistStr.add("사번");
    linkedlistStr.add(1, "이번");
    System.out.println(linkedlistStr); // [일번, 이번, 삼번, 사번]
    
    linkedlistInt.removeFirst(); //첫번째 데이터 삭제
    linkedlistInt.removeLast(); // 마지막 데이터 삭제
    linkedlistInt.remove(); // 안에 숫자 넣으면 해당 인덱스 삭제, 빈 값이면 0번째 삭제
    linkedlistInt.clear(); //모든 값 제거
  }
}
- O(n)(빅 오) : 알고리즘 최악의 실행 시간
- 최악의 시간을 고려하더라도 이 정도의 성능을 보장한다는 의미한다.
- 가장 일반적으로 많이 사용되는 표기법이다.
- Ex) O(1), O($\log$ n), O(n), O($\log$ n), O($n^2$), O($2^n$), O(n!) (log의 베이스는 2)
- $\Omega$(n) : 알고리즘 최상의 실행 시간
- $\theta$(n) : 알고리즘 평균 실행 시간
	for(int i=0; i<=100; i++){
    	System.out.println(i);
    }
	for(int i=0; i<=n; i++){
    	System.out.println(i); //1
       }
       
    for(int n=0; n<=10; n++){}
     for(int i=0; i<=n; i++){
    	System.out.println(i);  //2
		}
     }
    for(int n=0; n<=k; n++){
     for(int i=0; i<=n; i++){
    	System.out.println(i);  
		}
     }
Reference: