From the course: Programming Foundations: Data Structures
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
- 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.
- Ex_Files_Prog_Found_Data_Struct.zip
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.
Contents
-
Introduction Introduction
-
Understand data structures1m 25s
-
What you should know43s
-
-
1. Introduction to Data Structures 1. Introduction to Data Structures
-
Introduction to data and data types2m 10s
-
Numerical data types4m 28s
-
Booleans and characters2m 23s
-
Primitive types in memory2m 44s
-
Introduction to data structures3m 1s
-
Strings2m 1s
-
Primitive vs. reference types in memory3m 43s
-
-
2. Arrays 2. Arrays
-
What are arrays?3m 51s
-
Use arrays in Swift4m 59s
-
Multidimensional arrays2m 41s
-
Multidimensional arrays in JavaScript3m 45s
-
Jagged arrays1m 27s
-
Jagged arrays in C#3m 45s
-
Resizable arrays and language support4m 13s
-
Search arrays3m 36s
-
Sort arrays2m 36s
-
Big O notation3m 59s
-
-
3. Lists 3. Lists
-
What are linked lists?2m 34s
-
Operations on linked lists1m 52s
-
Build a linked list in Java4m 34s
-
Use linked lists in Java4m 31s
-
Singly vs. doubly linked lists1m 3s
-
Lists in other languages2m 33s
-
Pros and cons of lists2m 48s
-
-
4. Stacks and Queues 4. Stacks and Queues
-
What are stacks?1m 35s
-
Implement stacks in Swift4m 41s
-
Use stacks in Swift for LIFO2m 21s
-
Error tracing with stacks4m 2s
-
What are queues?1m 24s
-
Implement queues in Swift3m 23s
-
Use queues in Swift for FIFO2m 19s
-
Queues in other languages1m 44s
-
Specialized queues3m 12s
-
Pros and cons of stacks and queues2m 10s
-
-
5. Hash-Based Data Structures 5. Hash-Based Data Structures
-
What are associative arrays?2m 41s
-
Understanding hash functions4m 21s
-
Understanding hash tables3m 15s
-
Using dictionaries in Python2m 18s
-
Language support for hashing1m 44s
-
Language support for hash tables1m 33s
-
Pros and cons of hash-based structures1m 21s
-
-
6. Trees and Graphs 6. Trees and Graphs
-
What are sets?2m 39s
-
Sets in Python 33m 31s
-
Introduction to tree data structures2m 38s
-
Understand binary search trees4m 5s
-
Understand heaps4m 7s
-
Pros and cons of tree data structures1m 50s
-
-
Conclusion Conclusion
-
Wrap-up37s
-