Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is “Data Structures”?

Similar presentations


Presentation on theme: "What is “Data Structures”?"— Presentation transcript:

1 What is “Data Structures”?
What will I learn in this course?

2 Major Topic Groups C# Language and .NET concepts .NET Class Library
Data Structures Algorithms Algorithm Analysis What is "Data Structures"? 18 September 2018

3 C# and .NET C# is similar to both Java and C++ in many ways
The syntax is nearly identical If you know Java, you can probably read and understand simple C# programs with little training Major differences between programming in C# and programming in Java are the class libraries they use .NET class library provides support for C# (and other .NET languages such as Visual Basic, F#, IronPython, and even C++.NET) Java is supported by AWT, Swing and other libraries in addition to the standard Java API libraries What is "Data Structures"? 18 September 2018

4 Why Learn C#? Most large companies in the area that hire our CS graduates do some or all of their software development in C# Nine of 11 companies represented in our advisory board want graduates to know C# What is "Data Structures"? 18 September 2018

5 What Are Data Structures?
A data structure is a container for holding data Usually think of a data structure as holding multiple data items An array is an example of this type of data structure A Java ArrayList <T> is another example of a data structure We may sometimes think of single objects as being data structures A string holds one string of characters that may be manipulated as a whole (input the string, output the string, compare the string, and so forth) A string may also be thought of as a collection of individual characters (or words) that we want to manipulate individually for some task An object of almost any class may be thought of as a container for the data represented by the object’s attributes What is "Data Structures"? 18 September 2018

6 Organization of the Data
There are many different ways in which individual data items in a data structure may be organized Stored in contiguous memory locations (e.g., an array) Stored in non-contiguous (possibly random) memory locations (e.g., a linked list) Stored externally in a file or data base on a hard drive, a USB drive, or “in the cloud” What is "Data Structures"? 18 September 2018

7 Organization of the Data
A data structure may be organized to facilitate specific types of usage Stored in first-come, first-served manner (a waiting line or queue) Stored in last-in, first out manner (stack) Stored in order of priority (priority-queue) Stored in sorted order Organized for efficient storage and retrieval or for efficient access to particular items Organized for minimal memory usage Organized for fastest access What is "Data Structures"? 18 September 2018

8 Data Structures Each type of data structure has its own characteristics There are trade-offs in deciding which data structure to use Memory requirements Efficiency (speed) of storing, finding, retrieving, or processing the data Ease of Understanding Programming Testing/debugging/maintenance Trade-offs: A fast algorithm on a given data structure may require more memory and be more difficult to understand, but a slower algorithm may take less memory and be easier to maintain What is "Data Structures"? 18 September 2018

9 Algorithms For a given data structure, we may need to do certain types of common activities such as Add data to the data structure Retrieve or remove data from the data structure Find a particular data item or items in the data structure Rearrange (sort) the data into some order meaningful for a particular task What is "Data Structures"? 18 September 2018

10 Algorithms For a data structure to be useful, it must be accompanied by implementations of the algorithms that allow one to manipulate the data in the desired ways Not all data structures are created equal There is no “best” data structure for all situations Some are more efficient for specific tasks than others are but the latter group may be more efficient for a different set of tasks One must choose the appropriate data structure for a given task What is "Data Structures"? 18 September 2018

11 Algorithm Analysis and Selection
There may be many different algorithms that can be used to accomplish a specific task on a particular data structure One must be able to analyze the different algorithms and choose one that is reasonably efficient for a given task For example, there are many different sorting algorithms; how should we choose one that works efficiently for our data What is "Data Structures"? 18 September 2018

12 Algorithm Limitations
Some algorithms do not make sense for a particular type of data structure, and, thus, no attempt to use them with that type of data structure should be attempted For example, what does it mean to sort a linked list of colored pixels (does a turquoise pixel come before or after a puce pixel, for example)? A queue is organized by the arrival time of the items it contains – sorting a queue by (say) employee name would destroy the ordering required by the queue – it would no longer be a queue What is "Data Structures"? 18 September 2018

13 Class Libraries There are many class libraries that contain good implementations of certain data structures and the algorithms that support them A library may have a class that implements a LinkedList, another class that implements a Queue, another for a Stack, and so forth The implementations may also contain many useful methods (algorithms) In this course, where possible, we will learn to use data structures implemented in the .NET class library Some data structures are not implemented in the .NET library, and we will have to build our own including the algorithms for inserting, finding, arranging, and retrieving items What is "Data Structures"? 18 September 2018


Download ppt "What is “Data Structures”?"

Similar presentations


Ads by Google