Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Data Structures and Program Design Using Python

You're reading from   Data Structures and Program Design Using Python A Self-Teaching Introduction to Data Structures and Python

Arrow left icon
Product type Paperback
Published in Aug 2024
Publisher Mercury_Learning
ISBN-13 9781836640738
Length 394 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Mercury Learning and Information Mercury Learning and Information
Author Profile Icon Mercury Learning and Information
Mercury Learning and Information
D. Malhotra D. Malhotra
Author Profile Icon D. Malhotra
D. Malhotra
N. Malhotra N. Malhotra
Author Profile Icon N. Malhotra
N. Malhotra
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface
1. Acknowledgments
2. Chapter 1: Introduction to Data Structures FREE CHAPTER 3. Chapter 2: Introduction to Python 4. Chapter 3: Arrays/Lists 5. Chapter 4: Linked Lists 6. Chapter 5: Queues 7. Chapter 6: Searching and Sorting 8. Chapter 7: Stacks 9. Chapter 8: Trees 10. Chapter 9: Multi-Way Search Trees 11. Chapter 10: Hashing 12. Chapter 11: Files 13. Chapter 12: Graphs 14. Index
Appendix: Answers to Multiple Choice Questions

1.6ANALYZING AN ALGORITHM

An algorithm can be analyzed by two factors: space and time. We should develop an algorithm that makes the best use of both these resources. Analyzing an algorithm measures the efficiency of the algorithm. The efficiency of the algorithm is measured in terms of the speed and time complexity. The complexity of an algorithm is a function that measures the space and time used by an algorithm in terms of input size.

Time Complexity–The time complexity of an algorithm is the amount of time taken by an algorithm to run the program completely. It is the runtime of the program. The time complexity of an algorithm depends upon the input size. The time complexity is commonly represented by using big O notation. For example, the time complexity of a linear search is O (n).

Space Complexity–The space complexity of an algorithm is the amount of memory space required to run the program completely. The space complexity of an algorithm depends upon the input...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Data Structures and Program Design Using Python
You have been reading a chapter from
Data Structures and Program Design Using Python
Published in: Aug 2024
Publisher: Mercury_Learning
ISBN-13: 9781836640738
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon