Skip to content

Commit 070ddd7

Browse files
committed
Section 9 ArrayAB
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
1 parent d609f74 commit 070ddd7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
Definition:
2-
3-
- Array: A fixed-size, contiguous memory data structure that stores elements of the same type.
4-
1+
- Array: A fixed-size, contiguous memory data structure that stores elements of the same type.
52
It provides constant-time (O(1)) access to elements via an index.
63

7-
- List (ArrayList/LinkedList): A dynamic collection that can grow or shrink in size.
8-
4+
- List (ArrayList/LinkedList): A dynamic collection that can grow or shrink in size.
95
It is part of Java’s java.util package and allows flexible manipulation of elements.
106

11-
`ArrayList` provides fast access, while `LinkedList` is optimized for frequent insertions/deletions.
12-
7+
ArrayList provides fast access, while LinkedList is optimized for frequent insertions/deletions.
138

149
Array vs. List in Java:
1510

@@ -24,4 +19,4 @@ Array vs. List in Java:
2419

2520

2621
Use Array when performance and fixed size matter.
27-
Use List when flexibility and dynamic resizing are needed.
22+
Use List when flexibility and dynamic resizing are needed.

0 commit comments

Comments
 (0)