Array - Introduction

참고 : https://leetcode.com/explore/learn/card/fun-with-arrays

릿코드 문제를 풀어보면서 해결해본 것들은 업데이트를 계속 진행하고 있습니다. (하단의 관련 포스트 참고)

배열

배열이 왜 필요할까?


장점


단점


Array Capacity VS Length (용량과 길이의 차이는?)


There are two different answers you might have given.

- The number of DVDs the box could hold, if it was full, or
- The number of DVDs currently in the box.

Both answers are correct, and both have very different meanings! It’s important to understand the difference between them, and use them correctly. We call the first one the capacity of the Array, and the second one the length of the Array.

즉, 배열의 총 공간이 용량(capacity) 현재 배열이 사용된 양이 길이, 갯수(length)

관련 포스트