Research/Data structure & algorithm

Data Structure: Introduction

RIEM 2022. 11. 24. 15:44
728x90

 

Reference

https://www.geeksforgeeks.org/data-structures/

https://en.wikipedia.org/wiki/List_of_data_structures

https://statmath.wu.ac.at/courses/data-analysis/itdtHTML/node55.html

https://www.youtube.com/watch?v=fpnE6UAfbtU&ab_channel=CrashCourse

https://protect.bju.edu/cps/docs/cps110/textbook/ch01s01.html

https://medium.com/omarelgabrys-blog/data-structures-language-support-5f70f8312e84

 


060. Section Overview

Data Structures + Algorithms = Programs

프로그램의 근간인 데이터 구조와 알고리즘을 알면, fundamental을 알면 어떤 언어에도 적용할 수 있는 지식을 얻는 것이다.

 

061. What Is A Data Structure

Data Structure?

  • Data Structure is a collection of values. arrangement of data.
  • Each have its own function such as refriger for freezing, cabinets for documents
  • ex) blockchain is simply data structure
  • Data structure convert chaos into things organized in order

https://www.geeksforgeeks.org/data-structures/

https://en.wikipedia.org/wiki/List_of_data_structures

Key points

  1. How to build one
  2. How to use it (over the other)

 

062. How Computers Store Data

https://statmath.wu.ac.at/courses/data-analysis/itdtHTML/node55.html

https://www.youtube.com/watch?v=fpnE6UAfbtU&ab_channel=CrashCourse

https://protect.bju.edu/cps/docs/cps110/textbook/ch01s01.html

 

Computer

  • RAM : To track variables, we need to check RAM(Random-access Memory). We remember space complexity.
  • Storage : HDD, SSD. data can be stored permanently.
  • CPU : Actual workers in com. Computer is run by the CPU. 

 

Tradeoff

  • Storage is slow but can store data permanently.
  • Ram is fast but can store data temporarily.

  • 0, 1 = off, on
  • 8 bit = 1 byte
  • 8 bit(11111111) hold 255 information
  • 16 bit hold 65,536
  • 32 bit - 2,147,483,647

 

  • CPU is connected to Memory Controller which read and write memory

RAM stands for Random-access?

CPU asks the RAM ‘what’s in it in the address 0?’. This allow direct jump to another address such as 1 -> 8 not 1, 2, 3, …, 8 in order. This is why we call this Random access

CPU also has memory?

CPU Cash is a tiny memory that copy recent datas from RAM.

Why Data Structure matters?

  • Data Structures remember the way to store information.
  • Each data type has a number of bits associated with it.
  • CPU가 Memory의 데이터에 접근할 때 0~100 사이 주소보다 0~10 사이 주소를 더 빨리 찾을 것이다. 데이터 구조는 이를 빨리 파악하게 해줘서 빠르게 데이터에 접근할 수 있도록 도와준다.

 

063. Data Structure in Different Languages

https://medium.com/omarelgabrys-blog/data-structures-language-support-5f70f8312e84

 

Python Data Types

 

JavaScript Data types

But we can create our own data structure as well.

 

064. Operations On Data Structure

  1. Insertion
  2. Deletion
  3. Traversal : systematically visiting every data one by one
  4. Searching
  5. Sorting
  6. Access : How can we get it?

 

728x90