Algoritmer och Datastrukturer - PowerPoint PPT Presentation

1 / 1
About This Presentation
Title:

Algoritmer och Datastrukturer

Description:

The stored data can be input, or output produced by a program, or any ... Cooking recipes can thus be seen as algorithms. ... putting them into a simple shopping ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 2
Provided by: lottall
Category:

less

Transcript and Presenter's Notes

Title: Algoritmer och Datastrukturer


1
Algoritmer och Datastrukturer
Program-konstruktion IIin ITP
Find, store and modify data in efficient ways
  • A data structure is a container for data. The
    stored data can be input, or output produced by a
    program, or any intermediate data created by the
    program. Operations can add data to a data
    structure, find data in a data structure, modify
    data in a data structure, remove data from a data
    structure, or list all the data in a data
    structure in some order.
  • An algorithm is an instruction set that one can
    follow in order to solve a given problem. Cooking
    recipes can thus be seen as algorithms. Also, the
    operations of adding, finding, modifying,
    removing, and listing data in a data structure
    need algorithms.
  • A program is an implementation of some algorithm
    in a particular programming language. In order to
    evaluate algorithms, data structures and
    programs, we measure the amount of resources,
    such as time or memory, that are consumed. We can
    do so without implementing the algorithm into a
    program and running it, just like engineers, who
    can compute the strength of a bridge before
    building it. With such measurements, we can
    recommend when to use a particular algorithm or
    data structure. We can also compare two
    algorithms that have the same specification.

Not all containers are
equally good for a given
combination of these
operations. For instance,
it takes some time to pack
things into a backpack with
many pockets, but finding and
removing a dry pair of socks
should then go quickly. Conversely, if the
objective is to takeclothes to the laundromat,
thenputting them into a simple shoppingbag is
sufficient as the effort of orderly packing them
into a backpack will not pay off. So, when
choosing a data structure, one has to consider
which operations will have to be performed on it,
and how often.
Prerequisites Functional programming, algebra.
Goal To provide methods to understand, analyse
and compare data structures, algorithms, and
programs. Required for Further courses in
algorithms and data structures. Courses that
require that you can program well.
Write a Comment
User Comments (0)
About PowerShow.com