## Data Structures

Start Date: 07/05/2020

 Course Type: Common Course

Explore 1600+ online courses from top universities. Join Coursera today to learn data science, programming, business strategy, and more.

A good algorithm usually comes together with a set of good data structures that allow the algorithm to manipulate the data efficiently. In this course, we consider the common data structures that are used in various computational problems. You will learn how these data structures are implemented in different programming languages and will practice implementing them in our programming assignments. This will help you to understand what is going on inside a particular built-in implementation of a data structure and what to expect from it. You will also learn typical use cases for these data structures. A few examples of questions that we are going to cover in this class are the following: 1. What is a good strategy of resizing a dynamic array? 2. How priority queues are implemented in C++, Java, and Python? 3. How to implement a hash table so that the amortized running time of all operations is O(1) on average? 4. What are good strategies to keep a binary tree balanced? You will also learn how services like Dropbox manage to upload some large files instantly and to save a lot of storage space! Do you have technical problems? Write to us: coursera@hse.ru

#### Course Syllabus

In this module, you will learn about the basic data structures used throughout the rest of this course. We start this module by looking in detail at the fundamental building blocks: arrays and linked lists. From there, we build up two important data structures: stacks and queues. Next, we look at trees: examples of how they’re used in Computer Science, how they’re implemented, and the various ways they can be traversed. Once you’ve completed this module, you will be able to implement any of these data structures, as well as have a solid understanding of the costs of the operations, as well as the tradeoffs involved in using each data structure.

#### Course Introduction

Data Structures and Design When you work with large datasets, it is important to understand the different data structures that are used and the different reasons for the design decisions. This course begins with a look at data structures that are used and discusses the design decisions behind a particular structure. Some of these structures include: Synthetic data structures, or data trees Old-style arrays Structured data structures, or SQLite However, it is not just a structure or SQL that we are concerned with, but also its semantics. This course is designed to expose students to the design decisions behind structuring large datasets. The intended audience of this course include data scientists, data engineers, data analysts, programmers, and anyone else that wants to understand the design decisions behind large datasets. In other courses, we have emphasized the design of the structure and the data processing logic used to support it. In this course, we hope to introduce the design decisions behind large datasets by introducing the different data structures, their reasons, and how these design decisions are made. This will help the students understand the data science process, starting with initial data collection, ending with the design of the structure that supports the data science process. Data scientists will be able to use the design principles that are presented in this course to design a structure that supports their data science goals. This will also help them use the SQLite3 database as a data science reporting structure.

#### Course Tag

Binary Search Tree Priority Queue Hash Table Stack (Abstract Data Type) List

#### Related Wiki Topic

Article Example
List of data structures This is a list of data structures. For a wider list of terms, see list of terms relating to algorithms and data structures. For a comparison of running time of subset of this list see comparison of data structures.
List of data structures In these data structures each tree node compares a bit slice of key values.
List of data structures These are data structures used for space partitioning or binary space partitioning.
Retroactive data structures At first glance the notion of a retroactive data structures seems very similar to persistent data structures since they both take into account the dimension of time. The key difference between persistent data structures and retroactive data structures is "how" they handle the element of time. A persistent data structure maintains several versions of a data structure and operations can be performed on one version to produce another version of the data structure. Since each operation produces a new version, each version thus becomes an archive that cannot be changed (only new versions can be spawned from it). Since each version does not change, the dependence between each version also does not change. In retroactive data structures we allow changes to be made directly to previous versions. Since each version is now interdependent, a single change can cause a ripple of changes of all later versions. Figures 1 and 2 show an example of this rippling effect.
List of terms relating to algorithms and data structures It defines a large number of terms relating to algorithms and data structures. For algorithms and data structures not necessarily mentioned here, see list of algorithms and list of data structures.
Array data structure Arrays are used to implement other data structures, such as lists, heaps, hash tables, deques, queues, stacks, strings, and VLists. Array-based implementations of other data structures are frequently simple and space-efficient (implicit data structures), requiring little space overhead, but may have poor space complexity, particularly when modified, compared to tree-based data structures (compare a sorted array to a search tree).
Data (computing) Data can be organized in many different types of data structures, including arrays, graphs, and objects. Data structures can store data of many different types, including numbers, strings and even other data structures. Data pass in and out of computers via peripheral devices.
Data structure Data structures provide a means to manage large amounts of data efficiently for uses such as large databases and internet indexing services. Usually, efficient data structures are key to designing efficient algorithms. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design. Data structures can be used to organize the storage and retrieval of information stored in both main memory and secondary memory.
Range query (data structures) In data structures, a range query consists of preprocessing some input data into a data structure to efficiently answer any number of queries on any subset of the input. Particularly, there is a group of problems that have been extensively studied where the input is an array of unsorted numbers and a query consists of computing some function on a specific range of the array. In this article we describe some of these problems together with their solutions.
Set (abstract data type) An abstract data structure is a collection, or aggregate, of data. The data may be booleans, numbers, characters, or other data structures. If one considers the structure yielded by packaging or indexing, there are four basic data structures:
Implicit data structure A fundamental distinction is between "static" data structures (read-only) and "dynamic" data structures (which can be modified). Simple implicit data structures, such as representing a sorted list as an array, may be very efficient as a static data structure, but inefficient as a dynamic data structure, due to modification operations (such as insertion in the case of a sorted list) being inefficient.
Persistent data structure These types of data structures are particularly common in logical and functional programming, and in a purely functional program all data is immutable, so all data structures are automatically fully persistent. Persistent data structures can also be created using in-place updating of data and these may, in general, use less time or storage space than their purely functional counterparts. Purely functional data structures are persistent data structures that completely avoid the use of mutable state, but can often still achieve attractive amortized time complexity bounds.
Data structure There are numerous types of data structures, generally built upon simpler primitive data types:
Data structure Data structures are generally based on the ability of a computer to fetch and store data at any place in its memory, specified by a pointer—a bit string, representing a memory address, that can be itself stored in memory and manipulated by the program. Thus, the array and record data structures are based on computing the addresses of data items with arithmetic operations; while the linked data structures are based on storing addresses of data items within the structure itself. Many data structures use both principles, sometimes combined in non-trivial ways (as in XOR linking).
Concurrent data structure Historically, such data structures were used on uniprocessor
Concurrent data structure data structures must typically (though not always) allow threads to
Concurrent data structure "sequential" data structures, intended for use on a uni-processor
Concurrent data structure support such agreement, concurrent data structures are implemented
Concurrent data structure of theory on the design of concurrent data structures (see
Concurrent data structure Concurrent data structures are significantly more difficult to design