- Linear searching algorithm sequentially checks each element in a list until the target element is found.
- Linear searching is suitable for small lists or unsorted data.
- Time complexity of linear searching is O(n).
- Binary searching algorithm requires a sorted list.
- Binary searching algorithm divides the list in half at each step and compares the target element with the middle element to determine if it lies in the first or second half of the list.
- Time complexity of binary searching algorithms is O(log n).
Python Programming
-
- 2-1. The Software Development Process
- 2.2 The Five Steps of Software Development: Understanding the Problem
- 2.3 The Five Steps of Software Development: Defining Program Specifications
- 2.4 The Five Steps of Software Development: Planning the Solution
- 2.5 The Five Steps of Software Development: Writing the Code
- 2.6 The Five Steps of Software Development: Testing and Debugging
- 2.7 Design a Program
- 2-8. Input, Processing, and Output
- 2-9. Example Program: Grade Calculator
- 2-10. Variables
- 2-11. Expressions
- 2-12. Output Statements - The print() Function
- 2-13. Assignment Statements
- Summary
- Programming Exercises
-
- 8-1. Why Functions?
- 8-2. The Syntax of Function Definition
- 8-3. Void Functions and Value Returning Functions
- 8-4. Function Arguments and Parameters
- 8-5. The if __name__ == "__main__": Statement
- 8-6. The yield Statement
- 8-7. Nesting Function Calls
- 8-8. Calling from the Call
- Summary
- Programming Exercises
Summary
Last updated: April 23, 2025