In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data.
More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.CS 에서 자료구조는 일반적으로 데이터에 대한 효율적인 접근을 위해 선택되는 데이터 구성, 관리 및 저장 형식이다.
엄밀히 말해, 자료구조는 데이터의 값, 그 사이의 관계, 데이터에 적용될 수 있는 기능이나 연산의 집합이다.
Physical? x
-> Logical
ADT specifies:
➣ 자료를 관리하기 위한 추상적인 개념
그 개념을 익히고 구현을 하시면 됩니다
알고리즘의 효율성을 표기해주는 표기법
➣ 다항식의 차수중 가장 큰 차수
이산수학에서 배웠다고 생각하고 이 정도 설명만 합니다. 자료구조 이론시간에 가르쳐 줘요. 모르겠으면 독학하시고 물어보세요.
밑에 링크 참고하세요
https://noahlogs.tistory.com/27
데이터가 저장된 메모리의 주소값을 저장하는 변수
메모리의 주소, 즉 '어디'인지(=위치 정보)를 저장하는 전용 변수!
class Node {
};
int main() {
Node *node1 = new Node;
Node *node2 = node1;
cout << node1 << endl;
cout << node2 << endl;
cout << &node1 << endl;
cout << &node2 << endl;
}
결과
0x6000004ac020
0x6000004ac020 // 둘이 똑같죠?
0x16b877548
0x16b877540 // 둘이 다르죠
위에 두개 : new Node
로 선언한 객체를 출력
아래 두개 : node1, node2의 각각의 주소
int a = 10;
int* ptr = &a;
cout << a << endl; // 1
cout << &a <<endl; // 2
cout << ptr << endl; // 3
cout << *ptr << endl; // 4
cout << &ptr << endl; // 5
결과가 똑같이 나오는 거는?