Data Structures and Algorithms in Python | 14. Arrays vs lists, binary search - Part B by Abraham | Learn Smarter
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Academics
Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Professional Courses
Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβ€”perfect for learners of all ages.

games
14. Arrays vs lists, binary search - Part B

The chapter discusses search algorithms focusing on both unsorted and sorted sequences. It contrasts a linear search method for unsorted data with the more efficient binary search technique used in sorted data. Additionally, it highlights the differences in performance and implementation considerations based on data structure types, particularly arrays versus lists in Python.

Sections

  • 13.1

    Searching For A Value In A Sequence

    This section discusses the concepts of searching for values in both unsorted and sorted sequences using simple Python functions.

  • 13.1.1

    Unsorted Sequence Search

    This section discusses techniques for searching values in an unsorted sequence, mainly focusing on simple linear search mechanisms.

  • 13.1.2

    Worst Case Analysis Of Unsorted Search

    This section discusses the worst-case scenario for searching a value in an unsorted sequence using a simple linear search algorithm.

  • 13.1.3

    Sorted Sequence Search

    This section covers the basics of searching within unsorted and sorted sequences, detailing both linear and binary search algorithms.

  • 13.1.4

    Binary Search Introduction

    This section introduces the concept of binary search as an efficient method for searching through sorted sequences.

  • 13.1.5

    Binary Search Demonstration

    This section introduces the concept of binary search, explaining its operation and efficiency compared to linear search methods.

  • 13.1.6

    Binary Search Algorithm Performance

    This section covers the performance and mechanics of both unsorted and sorted sequence searching algorithms, focusing on the efficiency of binary search in sorted sequences.

  • 13.1.7

    Recurrence Relation For Binary Search

    This section covers the process and efficiency of binary search, including its recurrence relation and practical implementation.

  • 13.1.8

    Efficiency Of Binary Search

    This section discusses the efficiency and mechanics of binary search compared to linear search in data sequences.

  • 13.1.9

    Lists Vs. Arrays In Python

    This section discusses the key differences between lists and arrays in Python, focusing on their search algorithms and performance characteristics.

Class Notes

Memorization

What we have learnt

  • A linear search checks each...
  • Binary search is an efficie...
  • The implementation of searc...

Final Test

Revision Tests