Confirm Download

Simultaneous file downloading works best in FireFox, Chrome, and Safari browsers. Please keep this window open until all downloads are complete. Some customers prefer using file download managers for Chrome or Firefox to better manage large and multiple file downloads.

Searching for an item in a collection is a fundamental operation in any computer program. In this module, you will learn two techniques to dramatically improve the performance of the Python 'in' operator.

Searching for an item in a collection is a fundamental operation in any computer program. In this module, you will learn two techniques to dramatically improve the performance of the Python 'in' operator.

Often you need to create a Binary Search Tree containing specific values given to you in sorted order; however, inserting the values into the tree in sorted order would lead to an inefficient structure. In this problem you will learn how to construct a balanced tree from a sorted list.

To evaluate the efficiency of an algorithm, you will learn about the technique of asymptotic analysis. You can analyze the execution and storage requirements using Big O notation. Using a number of examples, this informational presentation on Big O notation will help you better document the performance of your code and understand the descriptions of existing code libraries.

You will learn about the Divide and Conquer strategy used by many efficient algorithms. It divides a problem into two subproblems whose solutions are then composed together to form a solution for the original problem. The MergeSort algorithm is described using this technique and you will see its use on Python lists as well as external files containing binary data.

Most sorting examples assume the input is stored in a list in memory. If you have to process large information on disk, however, it is simply not possible to load the information into memory. You will learn how to apply MergeSort to sort an external file containing integers stored in 32-bit binary format.

There are numerous mathematical algorithms you can use to improve the execution performance of your code. You will learn ExponentiationBySquaring, which Python already uses as part of its '**' operator. Here you will learn how to use this algorithm to dramatically improve the performance of using matrix multiplication to compute M^n for a square matrix M. You will learn how to use this algorithm to write a simple probabilistic primality test for very large numbers.

The algorithms in this course are intended to be deterministic, namely, returning the same output when given the same input. A different class of probabilistic algorithms produce answers that are not guaranteed to be correct. They can still be useful, however, and you will learn how to use this approach to design a simple probabilistic algorithm that determines whether a very large number is a prime number; with repeated execution, you can increasingly become confident in the output, but it will never be 100% guaranteed.

Many problems can be presented as a single-player game where the goal is to find a sequence of moves from an initial state to a final goal state. You will learn a Brute Force strategy to solve a wide variety of combinatoric problems.

A Magic square is an n-by-n two-dimensional matrix of numbers from 1 to n^2 such that the sum of the values in each row, column, and long diagonals are the same. Using the Brute Force approach (with some optimizations), you can write code to generate 4x4 magic squares.

KD trees are able to represent two-dimensional data sets using a recursive structure based on Binary Trees. Using this data structure, you can write efficient algorithms to find the point in a dataset that is closest to a target query point. You will learn how to write a small graphical application for users to add points and query for the nearest point to the mouse cursor.

KD trees are able to represent two-dimensional data sets using a recursive structure based on Binary Trees. Using this data structure, you can write efficient algorithms to find the point in a dataset that is closest to a target query point. You will learn how to write a small graphical application for users to add points and query for the nearest point to the mouse cursor.

The KD tree structure lets you rapidly determine whether a point (x,y) is a member of the collection of points in the tree. A Nearest Neighbor Query asks you to find the point in the KD tree which is closest to a target (x,y) point. You will learn how to modify the KD Tree structure and a graphical interface to support the Nearest Neighbor Query.

Graphs are a common data structure to represent complicated structured data. Given a graph G of vertices, one often wants to traverse the edges from one vertex to a special destination vertex. Use DepthFirstSearch to search a finite graph to identify a valid path. You will learn about this algorithm in the context of rectangular mazes.

Graphs are a common data structure to represent complicated structured data. Given a graph G of vertices, one often wants to traverse the edges from one vertex to a special destination vertex. Use DepthFirstSearch to search a finite graph to identify a valid path. You will learn about this algorithm in the context of rectangular mazes.

Dynamic programming solves complex problems by breaking them down into simpler subproblems. This versatile technique can be used to solve a wide range of problems. You will learn how to compute the shortest path between any two vertices in a weighted, directed graph. You will learn how to represent the All Pairs Shortest Path as a dynamic programming solution.

Given two strings, s1 and s2, it is possible to compute the Minimum Edit Distance, which determines the number of individual character replacements, insertions, and deletions necessary to convert s1 into s2. This problem is important in the study of mutation in DNA sequences. You will learn how to use Dynamic Programming to solve this problem.

Given a graph of vertices and edges, where each edge has a discrete weight, determine a path between two vertices whose total accumulated sum of edge weights along the path is minimal. You will learn the Single-Source Shortest Path and how to use a modified Priority Queue to efficiently solve this problem. The Priority Queue implementation is based on the Heap presented in an earlier module.

Given an undirected graph with weights associated with each edge, a spanning Tree is a subset of edges from the original graph that ensures the vertices in the graph remain connected even when all other edges are removed. A Minimum Spanning Tree ensures that the sum total of the edge weights is minimal for any potential spanning tree in the graph. You will use the Priority Queue structure to solve this problem.

Working with Algorithms in Python

Publisher: O'Reilly Media

Released: July 2014

Run
time: 8 hours 40 minutes

Learn how to make your Python code more efficient by using algorithms to solve a variety of tasks or computational problems. In this video course, you’ll learn algorithm basics and then tackle a series of problems—such as determining the shortest path through a graph and the minimum edit distance between two genomic sequences—using existing algorithms.

Computer scientist George Heineman fully implements each algorithm from scratch in real time, narrating key concepts and steps along the way, and then demonstrates the execution performance of the algorithm implementations on the model problems.

Algorithms are essential to the way computers process data. The examples you’ll learn in this course are among the most common algorithms in computer science, but they illustrate many of the concerns you’ll face as you work to create algorithms on your own. All code is available on GitHub (https://github.com/heineman/python-algorithms).

The topics in this video course include:

Just enough mathematical concepts to understand how to analyze algorithms

How can we help?

I can play free video chapters but not the video chapters I purchased.

The login status in the upper right corner is stuck at "Authenticating..."

Make sure these login related domains can create cookies and are allowed by your firewall and browser:

*.oreilly.com

*.oreillystatic.com

*.cloudfront.net

*.janrainsso.com

*.janrain.com

*.rpxnow.com

*.janrainbackplane.com

After unblocking the listed domains, visit members.oreilly.com to log in again and click Watch/Download Video to get back to the video player page.

I can't find the code examples or working files mentioned in the video.

Code examples and working files can be found in one of two places:

Linked in the description of each video chapter, made visible by clicking on the Expand All link in the Table of Contents.

Available via a red button labeled "Download Example Code" visible under the video player display on the right hand side.

I can't download the video files or the video files I downloaded are incomplete.

Most web browsers limit the number of simultaneous downloads or require consistent fast download speed to download large video files. We recommend downloading the files one at a time, or use a download manager with your browser.

I am experiencing poor quality audio and/or video.

Audio and video problems can be caused by a connection issue or a problem with a specific video file. Refresh the player page to reset streaming or download the video file to play locally.

I still need help and would like to provide additional information.

I would like customer service to follow up with me at this email address:

We're sorry you experienced a problem with our video player.

You will receive an email response as soon as possible, Monday through Friday from 7:30AM to 5:00PM Pacific Time from the O'Reilly Customer Service team. We are also available via phone at 707.827.7019 or toll-free at 800.889.8969 and via direct email at videofeedback@oreilly.com