-
[자료구조] How to analyze performance of data structure?카테고리 없음 2022. 8. 6. 23:39
Data structures refer to how data is organized.
Data doesn’t just matter for organization’s sake, but can significantly impact how fast your code runs.
Depending on how you choose to organize your data, your program may run faster or slower by orders of magnitude.
To understand the performance of any data structure, we need to analyze the common ways our code might interact with that data structure :
• Read: Reading refers to looking something up at a particular spot within the data structure.
• Search: Searching refers to looking for a particular value within a data structure.
• Insert: Insertion refers to adding a new value to our data structure.
• Delete: Deletion refers to removing a value from our data structure.
Time complexity : Measuring the speed of an operation
when we measure how “fast” an operation takes, we do not refer to how fast the operation takes in terms of pure time, but instead in how many steps it takes.
reference : A Common-Sense Guide to Data Structures and Algorithms