9.13 Searching & Sorting
This lesson introduces fundamental algorithms in computer science for locating and organizing data. It focuses on the sequential search technique to find specific elements within an array and the bubble sort method to order datasets in ascending or descending sequence, emphasizing the concept of data swapping using a temporary variable.
ප්රධාන සංකල්ප
- Sequential Search
- An algorithmic technique used to find a target value within a list by checking each element of the array in order from the beginning until a match is found or the end is reached.
- Bubble Sort
- A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order (ascending or descending).
- Data Swapping
- The process of mutually exchanging values between two storage locations/variables, typically requiring a temporary auxiliary variable to prevent data loss.
MCQ කට්ටල
MCQ 12විභාගයේදී
- Writing and completing Python programs for Sequential Search
- Writing and completing Python programs for Bubble Sort
- Tracing array states step-by-step during a Bubble Sort pass
- Explaining the role of temporary variables in variable swapping operations
