Introduction to Data& Array
• • Data: Raw facts and figures
• • Array: Collection of elements stored at
contiguous memory locations
• • Example: [5, 3, 8, 4, 2]
• • Arrays allow quick access using index
• • Sorting algorithms are mostly applied on
arrays
3.
What is Sorting?
•• Sorting: Arranging data in a particular order
(ascending/descending)
• • Example: [5, 3, 8, 4, 2] → [2, 3, 4, 5, 8]
• • Makes data easier to understand and use
4.
Why Sorting isImportant?
• • Improves efficiency of search operations
• • Useful in data analysis & report generation
• • Used in databases, UIs, leaderboards etc.
When to UseWhich Sort?
• Bubble: Simple but slow
• Insertion: Good for small/nearly sorted data
• Selection: Easy logic
• Merge: Large datasets, stable
• Quick: Fastest in practice
12.
Summary
• • Sortingis essential in CS
• • Many types, different use-cases
• • Start from basics like arrays to understand
better
13.
Thank You
• •Questions welcome
• • Thanks for your attention!