| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- Python
- Pre-processing
- string
- 배열
- 문자열
- Object Oriented Programming
- 오블완
- 포인터
- C++
- 함수
- Data Science
- vscode
- function
- 반복문
- 백준
- Deep Learning
- const
- pointer
- 알고리즘
- pass by reference
- raw data
- 티스토리챌린지
- programming
- assignment operator
- OOP
- Class
- baekjoon
- predictive analysis
- array
- 파이썬
- Today
- Total
Channi Studies
[ADT] Set - 1 본문
SET ADT
A set is a collection of distinct elements.
A set add operation adds an element to the set, provided an equal element doesn't already exist in the set. (No duplicates)
Ex. The set with 3, 7, and 9 is equivalent to the set with integers 9, 3, and 7.
만약 Python의 Set에 대해서 알고 계시다면, 그것과 동일하다고 생각할 수 있겠습니다.

Element Keys and Removal
Set elements may be primitive data values, such as numbers or strings, or objects with numerous data members.
When storing objects, set implementations commonly distinguish elements based on element's key value. A primitive data value that serves as a unique identifier for the element.
(Ex. 대학교의 학생 정보를 Set 자료형을 통해서 다루고 있다면, 중복된 값을 가질 수 없는 Student ID 번호를 key value로 사용합니다)
Sets are commonly implemented to use keys for all element types. When storing objects, the set retrieves an object's key via an external function or predetermined knowledge of which object property is the key value. When storing primitive data values, each primitive data value's key is itself.
Given a key, a set remove operation removes the element with the specific key from the set.

Searching and Subsets
Given a key, a set search opeartion returns the set element with the specified key, or null if no such element exists. The search operation can be used to implement a subset test.
A set X is a subset of Y only if every element of X is also an element of Y.

'Data Science > Data Structure & Algorithm' 카테고리의 다른 글
| [ADT] Set - 3 | Python Implementation (0) | 2025.05.15 |
|---|---|
| [ADT] Set - 2 | Set Opeartions (0) | 2025.05.15 |
| [Data Structure] Treaps | 트립 (1) | 2025.05.09 |
| [ADT] Priority Queue Abstract Data Type (0) | 2025.05.09 |
| Abstract Data Type (ADT) V.S. Data Structure | 추상 자료형 vs 자료 구조형 (0) | 2025.05.09 |