CS/자료구조

Chapter 0: Introduction

arsenic-dev 2025. 3. 21. 19:14

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.

What do we learn?

Data Structure

Data

The way to represent information in a suitable format for communication or analysis by humans or maachines.

 

Data Structure

We should be able to properly manage a collection of data elements.

Why should we learn data structure?

to develop a high-quality program

  • It works.
  • It can be modified without excessive time and effort.
  • It is reusable.
  • It is efficient. (It is completed on time and within budget.)

Understanding data structure helps your program work faster while using only smaller resources.

How?

Data structure does not mean only 'shape'.

Data structure allows better (more efficient) access and modification of data elements.

It defines the organization, management, and storage format of data elements.

You are a librarian

▶ 1 option: just random (in the order that I grab)

  • Pros: very fast to organize
  • Cons: difficult to find a book

▶ 2 option: alphabetical order

  • Pros: fast to find a book when you know the book title
  • Cons: time-consuming to organize

▶ 3 option: organize by gneres in each separate section

  • Pros: easy to find books in a specific genre
  • Cons: inefficient from the spatial (resource) perspective

▶ 4 option: organize by gneres in unseparated shelf

  • Pros: resource-efficient compared to 3 option
  • Cons: laborious(힘이 드는) when you add a book

What is the best?

There's never a one-size-fits-all(일률적인) solution.
Each has pros and cons.

 

Choose your best

If your job is to find the book by title:

  • 2 option is the best (alphabetical order).

If your job is to recommend the book in a user's preferred genre:

  • 3 or 4 option is the best (by genre).

If you have only limited space:

  • 4 option is better than 3 option.

If a bunch of(다수의) new books is added every day:

  • 3 option is better than 4 option.
In this course, we will learn various data structures and where we use them (pros and cons)

'CS > 자료구조' 카테고리의 다른 글

Chapter 4: Queue  (0) 2025.03.31
Chapter 3: Stack  (1) 2025.03.28
Programming Exercise: Lab #1  (5) 2025.03.25
Chapter 2: Unsorted/Sorted Lists  (3) 2025.03.23
Chapter 1: Software, Data Structure, and C++  (2) 2025.03.22