Advantages and disadvantages of lists in Python

From the course: Programming Foundations: Data Structures

Video is locked.

Unlock the full course today

Join today to access over 17,300 courses taught by industry experts or purchase this course individually.

Pros and cons of lists - Python Tutorial

From the course: Programming Foundations: Data Structures

Start my 1-month free trial Buy this course [703,000.00*]
  • Transcripts
  • Exercise Files
  • View Offline

Pros and cons of lists

- There are many different data structures we can use for our data, and a linked list is one of them. We can compare its operations independently of input, with Big O Notation, which describes the performance or complexity of an algorithm. Some of the operations we've looked at are Access, Update, Insert, Search and Delete. Again, for each of these, we can come up with its run time complexity to determine how much computational time each operation takes as compared to the others with the linked list. For accessing an item with a linked list, the best case is if the item we are trying to access is the first item in the linked list. If this is the case, then it takes constant time because we just grab the head of the list with the name of the list dot head. If we want to get the last item of a singly linked list, then we need to follow all of the next nodes, until we find that item. This means accessing could take linear time in the worst case because we need to grab each item to find

Practice while you learn with exercise files

Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.

  • Exercise File: Subscribe to access. Ex_Files_Prog_Found_Data_Struct.zip
Download the exercise files for this course. Get started with a free trial today.

Download courses and learn on the go

Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.

Watch this course anytime, anywhere. Get started with a free trial today.

Contents

  • Introduction Introduction
    • Understand data structures
      1m 25s
    • What you should know
      43s
  • 1. Introduction to Data Structures 1. Introduction to Data Structures
    • Introduction to data and data types
      2m 10s
    • Numerical data types
      4m 28s
    • Booleans and characters
      2m 23s
    • Primitive types in memory
      2m 44s
    • Introduction to data structures
      3m 1s
    • Strings
      2m 1s
    • Primitive vs. reference types in memory
      3m 43s
  • 2. Arrays 2. Arrays
    • What are arrays?
      3m 51s
    • Use arrays in Swift
      4m 59s
    • Multidimensional arrays
      2m 41s
    • Multidimensional arrays in JavaScript
      3m 45s
    • Jagged arrays
      1m 27s
    • Jagged arrays in C#
      3m 45s
    • Resizable arrays and language support
      4m 13s
    • Search arrays
      3m 36s
    • Sort arrays
      2m 36s
    • Big O notation
      3m 59s
  • 3. Lists 3. Lists
    • What are linked lists?
      2m 34s
    • Operations on linked lists
      1m 52s
    • Build a linked list in Java
      4m 34s
    • Use linked lists in Java
      4m 31s
    • Singly vs. doubly linked lists
      1m 3s
    • Lists in other languages
      2m 33s
    • Pros and cons of lists
      2m 48s
  • 4. Stacks and Queues 4. Stacks and Queues
    • What are stacks?
      1m 35s
    • Implement stacks in Swift
      4m 41s
    • Use stacks in Swift for LIFO
      2m 21s
    • Error tracing with stacks
      4m 2s
    • What are queues?
      1m 24s
    • Implement queues in Swift
      3m 23s
    • Use queues in Swift for FIFO
      2m 19s
    • Queues in other languages
      1m 44s
    • Specialized queues
      3m 12s
    • Pros and cons of stacks and queues
      2m 10s
  • 5. Hash-Based Data Structures 5. Hash-Based Data Structures
    • What are associative arrays?
      2m 41s
    • Understanding hash functions
      4m 21s
    • Understanding hash tables
      3m 15s
    • Using dictionaries in Python
      2m 18s
    • Language support for hashing
      1m 44s
    • Language support for hash tables
      1m 33s
    • Pros and cons of hash-based structures
      1m 21s
  • 6. Trees and Graphs 6. Trees and Graphs
    • What are sets?
      2m 39s
    • Sets in Python 3
      3m 31s
    • Introduction to tree data structures
      2m 38s
    • Understand binary search trees
      4m 5s
    • Understand heaps
      4m 7s
    • Pros and cons of tree data structures
      1m 50s
  • Conclusion Conclusion
    • Wrap-up
      37s

Video liên quan

Chủ Đề