Arrays & Lists in C#
Use fixed arrays, List<T>, and collection expressions (C# 12+) — creation, traversal, searching, insertion, removal, sorting, and multi-dimensional arrays.
Array & List Creation
Fixed Array Literal
Fixed Array Literal
List<T> Creation
List<T> Creation
Array ↔ List Conversion
Array ↔ List Conversion
Array & List Fundamentals
Getting Size
Getting Size
Accessing Element at Index
Accessing Element at Index
Updating Element at Index
Updating Element at Index
Removing Element at Index
Removing Element at Index
Traversing a List
Regular for Loop
Regular for Loop
foreach Loop
foreach Loop
ForEach with Lambda
ForEach with Lambda
Searching, Joining & Comparing
Check if an Element Exists
Check if an Element Exists
Find Element Index
Find Element Index
Find Element Index from Last
Find Element Index from Last
Joining Elements
Joining Elements
Comparing Arrays by Contents
Comparing Arrays by Contents
Insertion & Removal
Insert / Remove from End
Insert / Remove from End
Insert / Remove from Start
Insert / Remove from Start
Insert & Remove at Specific Index
Insert & Remove at Specific Index
Advanced Array & List Operations
Reverse
Reverse
Sort
Sort
Shuffle
Shuffle
Multi-dimensional Array
Multi-dimensional Array
Traversing Multi-dimensional Arrays
Traversing Multi-dimensional Arrays
Concatenating Lists
Concatenating Lists
Flattening Nested Lists
Flattening Nested Lists
Removing Duplicates
Removing Duplicates
Shallow & Deep Clone
Shallow & Deep Clone
Higher Order Functions (LINQ)
Select() — map
Select() — map
Where() — filter
Where() — filter
Aggregate() — reduce
Aggregate() — reduce
ForEach() — forEach
ForEach() — forEach
FirstOrDefault() — find
FirstOrDefault() — find
FindIndex() — findIndex
FindIndex() — findIndex
Any() & All() — some & every
Any() & All() — some & every
OrderBy() / OrderByDescending() — sort
OrderBy() / OrderByDescending() — sort
Chaining LINQ Operations
Chaining LINQ Operations
List<T> vs LinkedList<T>
LinkedList<T> Basics
LinkedList<T> Basics
Performance Comparison
Performance Comparison