목록#1 (2)
오븐 노트
#include using namespace std; #include #include class Node // 단일 연결 리스트 { public: Node* _next; int _data; }; // 단일 / 이중 / 원형 // list : 연결 리스트 // [] 한칸이 노드의 개념 // [1] -> [2] -> [3] -> [4] -> [5] // [1] [2] [3] [4] [5] // [1] [2] [3] [4] [5] [1] int main() { // list (연결 리스트) // - list의 동작 원리 // - 중간 삽입/삭제 // - 처음/끝 삽입/삭제 // - 임의 접근 list li; for (int i = 0; i < 100; i++) li.push_back(i); //li.push_..
#include using namespace std; #include int main() { // STL (Standard Template Library) // 프로그래밍 할 때 필요한 자료구조 / 알고리즘들을 템플릿으로 제공하는 라이브러리 // 컨테이너(Container) : 데이터를 저장하는 객체 (자료구조 Data Structure) // vector (동적 배열) // - vector의 동작 원리 (size/capacity) // - 중간 삽입/삭제 // - 처음/끝 삽입/삭제 // - 임의 접근 // 동적 배열 /*int arr[100]; // 대충 예를 들어 이런 느낌 int* arr2 = new int[100]; delete arr2; arr2 = new int[1000];*/ // 1) (..