Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Hands-On Data Structures and Algorithms with Python – Third Edition
  • Table Of Contents Toc
  • Feedback & Rating feedback
Hands-On Data Structures and Algorithms with Python – Third Edition

Hands-On Data Structures and Algorithms with Python – Third Edition - Third Edition

By : Dr. Basant Agarwal
4.8 (26)
close
close
Hands-On Data Structures and Algorithms with Python – Third Edition

Hands-On Data Structures and Algorithms with Python – Third Edition

4.8 (26)
By: Dr. Basant Agarwal

Overview of this book

Choosing the right data structure is pivotal to optimizing the performance and scalability of applications. This new edition of Hands-On Data Structures and Algorithms with Python will expand your understanding of key structures, including stacks, queues, and lists, and also show you how to apply priority queues and heaps in applications. You’ll learn how to analyze and compare Python algorithms, and understand which algorithms should be used for a problem based on running time and computational complexity. You will also become confident organizing your code in a manageable, consistent, and scalable way, which will boost your productivity as a Python developer. By the end of this Python book, you’ll be able to manipulate the most important data structures and algorithms to more efficiently store, organize, and access data in your applications.
Table of Contents (17 chapters)
close
close
14
Other Books You May Enjoy
15
Index

Setting up a Python development environment

Once you have installed Python successfully for your respective OS, you can start this hands-on approach with data structures and algorithms. There are two popular methods to set up the development environment.

Setup via the command line

The first method to set up the Python executing environment is via the command line, after installation of the Python package on your respective operating system. It can be set up using the following steps.

  1. Open the terminal on Mac/Linux OS or Command Prompt on Windows.
  2. Execute the Python 3 command to start Python, or simply type py to start Python in the Windows Command Prompt.
  3. Commands can be executed on the terminal.
Text, letter  Description automatically generated

Figure 1.1: Screenshot of the command-line interface for Python

The User Interface for the command-line execution environment is shown in Figure 1.1.

Setup via Jupyter Notebook

The second method to run the Python program is through Jupyter Notebook, which is a browser-based interface where we can write the code. The User Interface of Jupyter Notebook is shown in Figure 1.2. The place where we can write the code is called a “cell.”

Figure 1.2: Screenshot of the Jupyter Notebook interface

Once Python is installed, on Windows, Jupyter Notebook can be easily installed and set up using a scientific Python distribution called Anaconda by taking the following steps.

  1. Download the Anaconda distribution from https://www.anaconda.com/products/individual.
  2. Install it according to the installation instructions.
  3. Once installed, on Windows, we can run the notebook by executing the jupyter notebook command at the Command Prompt. Alternatively, following installation, the Jupyter Notebook app can be searched for and run from the taskbar.
  4. On Linux/Mac operating systems, Jupyter Notebook can be installed using pip3 by running the following code in the terminal:
    pip3 install notebook
    
  5. After installation of Jupyter Notebook, we can run it by executing the following command at the Terminal:
    jupyter notebook
    

    On some systems, this command does not work, depending upon the operating system or system configuration. In that case, Jupyter Notebook should start by executing the following command on the terminal.

    python3 -m notebook
    

It is important to note that we will be using Jupyter Notebook to execute all the commands and programs throughout the book, but the code will also function in the command line if you’d prefer to use that.

Visually different images
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.
Hands-On Data Structures and Algorithms with Python – Third Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon