Review/Trends
๐ญ๐ฎ ๐๐ฎ๐๐ฎ ๐ฆ๐๐ฟ๐๐ฐ๐๐๐ฟ๐ฒ๐ ๐ฌ๐ผ๐ ๐ ๐๐๐ ๐๐ป๐ผ๐
Data structures are the foundation of any programming language.
Data structures are the foundation of any programming language. They are used to organize and store data in a way that makes it efficient to access and manipulate.
As a tech professional, it is essential to understand different data structures and how to use them effectively.
Today, we will discuss 12 of the most common and important data structures:
โข ๐๐ฟ๐ฟ๐ฎ๐๐: An array is a collection of items stored in contiguous memory locations. Arrays are efficient for random access, but they can be slow for inserting or deleting elements in the middle.
โข ๐ฆ๐๐ฟ๐ถ๐ป๐ด๐: A string is a sequence of characters. Strings are used to represent text data.
โข ๐ง๐๐ฝ๐น๐ฒ๐: A tuple is an immutable list of elements. Tuples are similar to arrays, but they cannot be modified after they are created.
โข ๐๐ถ๐๐๐: A list is a linear collection of items that can be of different data types. Lists are flexible and can be used to store a variety of data.
โข ๐๐ถ๐ฐ๐๐ถ๐ผ๐ป๐ฎ๐ฟ๐ถ๐ฒ๐: A dictionary (also called a hash table) is a collection of key-value pairs. Dictionaries are efficient for looking up values by key.
โข ๐ฆ๐ฒ๐๐: A set is a collection of unique elements. Sets are useful for storing unique items and checking for membership.
โข ๐ง๐ฟ๐ฒ๐ฒ๐: A tree is a hierarchical data structure that simulates a tree structure with a root node, child nodes, and so on. Trees are efficient for searching and sorting data.
โข ๐๐ถ๐ป๐ธ๐ฒ๐ฑ ๐๐ถ๐๐๐: A linked list is a linear data structure where each element (or node) contains data and a reference (or pointer) to the next node in the list. Linked lists are more flexible than arrays for inserting or deleting elements, but they can be slower for random access.
โข ๐ฆ๐๐ฎ๐ฐ๐ธ๐: A stack is a LIFO (Last In, First Out) data structure. Stacks are like a pile of plates. You can only add or remove elements from the top of the stack. Stacks are useful for implementing undo/redo functionality and function calls.
โข ๐ค๐๐ฒ๐๐ฒ๐: A queue is a FIFO (First In, First Out) data structure. Queues are like a line of people waiting for something. The first person in line is the first person to be served. Queues are useful for processing tasks in a specific order.
โข ๐๐ฟ๐ฎ๐ฝ๐ต๐: A graph is a non-linear data structure that consists of nodes (or vertices) and edges (or links) that connect them. Graphs are used to represent relationships between objects.
โข ๐ ๐ฎ๐ฝ๐: A map is similar to a dictionary but it can store key-value pairs where the keys can be of any data type. Maps are useful for storing and retrieving data based on keys that may not be strings.
By understanding these data structures, you will be able to write more efficient and effective code and answer those nasty interview questions with confidence :-)
Translate to Korean
๋ฐ์ดํฐ ๊ตฌ์กฐ๋ ๋ชจ๋ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด์ ๊ธฐ์ด์ ๋๋ค. ์ด๋ ํจ์จ์ ์ผ๋ก ์ก์ธ์คํ๊ณ ์กฐ์ํ ์ ์๋ ๋ฐฉ์์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ๊ตฌ์ฑํ๊ณ ์ ์ฅํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
๊ธฐ์ ์ ๋ฌธ๊ฐ๋ก์ ๋ค์ํ ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ์ด๋ฅผ ํจ๊ณผ์ ์ผ๋ก ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ์ดํดํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
์ค๋์ ๊ฐ์ฅ ์ผ๋ฐ์ ์ด๊ณ ์ค์ํ ๋ฐ์ดํฐ ๊ตฌ์กฐ 12๊ฐ์ง์ ๋ํด ์ดํด๋ณด๊ฒ ์ต๋๋ค.
โข ๐๐ฟ๐ฟ๐ฎ๐๐: ๋ฐฐ์ด์ ์ธ์ ํ ๋ฉ๋ชจ๋ฆฌ ์์น์ ์ ์ฅ๋ ํญ๋ชฉ์ ๋ชจ์์ ๋๋ค. ๋ฐฐ์ด์ ์์ ์ก์ธ์ค์๋ ํจ์จ์ ์ด์ง๋ง ์ค๊ฐ์ ์์๋ฅผ ์ฝ์ ํ๊ฑฐ๋ ์ญ์ ํ๋ ๋ฐ๋ ์๋๊ฐ ๋๋ฆด ์ ์์ต๋๋ค.
โข ๐ฆ๐๐ฟ๐ถ๐ป๐ด๐.: ๋ฌธ์์ด์ ์ผ๋ จ์ ๋ฌธ์์ ๋๋ค. ๋ฌธ์์ด์ ํ ์คํธ ๋ฐ์ดํฐ๋ฅผ ๋ํ๋ด๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
โข ๐ง๐๐ฝ๐น๐ฒ๐: ํํ์ ๋ถ๋ณ์ ์์ ๋ชฉ๋ก์ ๋๋ค. ํํ์ ๋ฐฐ์ด๊ณผ ์ ์ฌํ์ง๋ง ์์ฑ๋ ํ์๋ ์์ ํ ์ ์์ต๋๋ค.
โข ๐๐ถ๐๐๐: ๋ชฉ๋ก์ ๋ค์ํ ๋ฐ์ดํฐ ์ ํ์ด ๋ ์ ์๋ ํญ๋ชฉ์ ์ ํ ๋ชจ์์ ๋๋ค. ๋ชฉ๋ก์ ์ ์ฐํ๋ฉฐ ๋ค์ํ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ ๋ฐ ์ฌ์ฉํ ์ ์์ต๋๋ค.
โข ๐๐ถ๐ฐ๐๐ถ๐ผ๐ป๐ฎ๐ฟ๐ถ๐ฒ๐: ์ฌ์ (ํด์ ํ ์ด๋ธ์ด๋ผ๊ณ ๋ ํจ)์ ํค-๊ฐ ์์ ๋ชจ์์ ๋๋ค. ์ฌ์ ์ ํค๋ณ๋ก ๊ฐ์ ์ฐพ๋ ๋ฐ ํจ์จ์ ์ ๋๋ค.
โข ๐ฆ๐ฒ๐๐: ์ธํธ๋ ๊ณ ์ ํ ์์์ ๋ชจ์์ ๋๋ค. ์ธํธ๋ ๊ณ ์ ํ ํญ๋ชฉ์ ์ ์ฅํ๊ณ ํ์ ์๊ฒฉ์ ํ์ธํ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
โข ๐ง๐ฟ๐ฒ๐ฒ๐: ํธ๋ฆฌ๋ ๋ฃจํธ ๋ ธ๋, ํ์ ๋ ธ๋ ๋ฑ์ผ๋ก ํธ๋ฆฌ ๊ตฌ์กฐ๋ฅผ ์๋ฎฌ๋ ์ด์ ํ๋ ๊ณ์ธต์ ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๋๋ค. ํธ๋ฆฌ๋ ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ํ๊ณ ์ ๋ ฌํ๋ ๋ฐ ํจ์จ์ ์ ๋๋ค.
โข ๐๐ถ๐ป๐ธ๐ฒ๐ฑ ๐๐ถ๐๐๐: ์ฐ๊ฒฐ๋ ๋ชฉ๋ก์ ๊ฐ ์์(๋๋ ๋ ธ๋)๊ฐ ๋ฐ์ดํฐ์ ๋ชฉ๋ก์ ๋ค์ ๋ ธ๋์ ๋ํ ์ฐธ์กฐ(๋๋ ํฌ์ธํฐ)๋ฅผ ํฌํจํ๋ ์ ํ ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๋๋ค. ์ฐ๊ฒฐ ๋ชฉ๋ก์ ์์๋ฅผ ์ฝ์ ํ๊ฑฐ๋ ์ญ์ ํ๋ ๋ฐ ๋ฐฐ์ด๋ณด๋ค ์ ์ฐํ์ง๋ง ์์ ์ก์ธ์ค์๋ ์๋๊ฐ ๋๋ฆด ์ ์์ต๋๋ค.
โข ๐ฆ๐๐ฎ๐ฐ๐ธ๐: ์คํ์ LIFO(Last In, First Out) ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๋๋ค. ์คํ์ ์ ์ ๋๋ฏธ์ ๊ฐ์ต๋๋ค. ์คํ ์๋จ์์๋ง ์์๋ฅผ ์ถ๊ฐํ๊ฑฐ๋ ์ ๊ฑฐํ ์ ์์ต๋๋ค. ์คํ์ ์คํ ์ทจ์/๋ค์ ์คํ ๊ธฐ๋ฅ๊ณผ ํจ์ ํธ์ถ์ ๊ตฌํํ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
โข ๐ค๐๐ฒ๐๐ฒ๐: ํ๋ FIFO(์ ์ ์ ์ถ) ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๋๋ค. ๋๊ธฐ์ด์ ๋ฌด์ธ๊ฐ๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ์ฌ๋๋ค์ ์ค๊ณผ ๊ฐ์ต๋๋ค. ์ค์ ์ ์๋ ์ฒซ ๋ฒ์งธ ์ฌ๋์ด ๊ฐ์ฅ ๋จผ์ ์๋น์ค๋ฅผ ๋ฐ๊ฒ ๋ฉ๋๋ค. ๋๊ธฐ์ด์ ํน์ ์์๋ก ์์ ์ ์ฒ๋ฆฌํ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
โข ๐๐ฟ๐ฎ๐ฝ๐ต๐: ๊ทธ๋ํ๋ ๋ ธ๋(๋๋ ๊ผญ์ง์ )์ ์ด๋ฅผ ์ฐ๊ฒฐํ๋ ๋ชจ์๋ฆฌ(๋๋ ๋งํฌ)๋ก ๊ตฌ์ฑ๋ ๋น์ ํ ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๋๋ค. ๊ทธ๋ํ๋ ๊ฐ์ฒด ๊ฐ์ ๊ด๊ณ๋ฅผ ๋ํ๋ด๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
โข ๐ ๐ฎ๐ฝ๐: ๋งต์ ์ฌ์ ๊ณผ ์ ์ฌํ์ง๋ง ํค๊ฐ ๋ชจ๋ ๋ฐ์ดํฐ ์ ํ์ผ ์ ์๋ ํค-๊ฐ ์์ ์ ์ฅํ ์ ์์ต๋๋ค. ๋งต์ ๋ฌธ์์ด์ด ์๋ ์๋ ์๋ ํค๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ณ ๊ฒ์ํ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
์ด๋ฌํ ๋ฐ์ดํฐ ๊ตฌ์กฐ๋ฅผ ์ดํดํจ์ผ๋ก์จ ๋ณด๋ค ํจ์จ์ ์ด๊ณ ํจ๊ณผ์ ์ธ ์ฝ๋๋ฅผ ์์ฑํ๊ณ ๋ถ์พํ ์ธํฐ๋ทฐ ์ง๋ฌธ์ ์์ ์๊ฒ ๋ตํ ์ ์์ ๊ฒ์ ๋๋ค :-)
Working on something like this?
I take a small number of paid, scoped reviews: AI agent/RAG architecture diagnosis, Unity CI & build-automation audits, and multimodal QA design review. Each one ends in a written findings document.
Work with me