data structures lecture 1 - introduction 2013aug27

Upload: javel-wilson

Post on 05-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    1/12

     

    Data Structures - CMP2006

    Lecture One

    By David W. [email protected]

    !niversity "# $echn"%"&y' (aaica)u&ust 20*+

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    2/12

     

    ,ected Outc"e

    At the end of this lecture, the student

    should:

    ● /ave a &enera% understandin& "# what wi%% e

    c"vered in this c"urse● ,%ain the eanin& and a%icati"n "#

    astract data tyes 1)D$s

    ● De"nstrate an understandin& "# structureddata tyes

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    3/12

     

    3ntr"ducti"n t" theData Structures C"urse

    ● $his c"urse draws heavi%y "n c"ncets tau&htin rere4uisite the c"urses Pr"&rain& 331CMP*02+ and Oject Oriented Pr"&rain&

    1C3$2005● Pr"&rain& 33 dea%t with structured

    r"&rain& c"nstructs' "du%arity'iterati"nrecursi"n' arrays' structures' "inters

    searchin& and s"rtin&● OOP dea%t with c%asses and "jects' "inters

    t" "jects' dynaic e"ry a%%"cati"n and

    dea%%"cati"n' inheritance and "%y"rhis

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    4/12

     

    3ntr"ducti"n t" theData Structures C"urse

    ● 3n this c"urse we wi%% a%s" desi&n and ana%y7ea%&"riths usin& seud"c"de

    ● Pseud"c"de was tau&ht in Pr"&rain& 3

    1CMP*025

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    5/12

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    6/12

     

    )ssessent

    ● $w" %a tests w"rth *0; each

    ● $w" %ecture tests w"rth *0; each

    ● One &r"u assi&nent 12 ers"ns w"rth *0;

    ● ) #ina% ea w"rth +0;

    $"ta% c"urse w"r8 < +0;' =ina% ,a < +0;

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    7/12

     

    $et""8s and "ther res"urces

    ● Recommended Websites

    - Cr"&rain&.c"Sh"rt tut"ria%s with ea%es' eercises and answershtt>www.cr"&rain&.c"a%&"riths-and-data-

    structures.ht%

    Recommended Textbooks- Data Structures> ) seud"c"de ar"ach withC::

    - C:: /"w t" Pr"&ra' Deite% and Deite%'Pears"nPrentice /a%%

    ● (ava /"w t" Pr"&ra' Deite% and Deite%'Pears"nPrentice /a%%

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    8/12

     

    Pr"&rain& Lan&ua&eand C"i%er

    ● C"urse wi%% e tau&ht usin& the (ava and C::Pr"&rain& Lan&ua&es

    ● C:: C"i%er used in %as ? Micr"s"#t isua%

    C:: ,ress 20*2● (ava C"i%er used in %as ? ,c%ise

    ● B"th "# these c"i%ers are avai%a%e as #ree

    d"wn%"ads 1#r" Micr"s"#t Wesite and,c%ise ="undati"n Wesite' "r #r" !$echLa shared #"%ders

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    9/12

     

    Why study data structuresA

    ● /avin& d"ne Pr"&rain& 3 and 33' OOP and"ssi%y CLDD' y"u sh"u%d y n"w e a%e t"ana%y7e a r"%e' desi&n the s"%uti"n usin&

    seud"c"de and !ML dia&ras' and i%eenty"ur desi&n in C:: "r (ava c"de

    ● S" y"u can write r"&ras...

    ● then why study data structures 1yet an"therr"&rain& c"urseA

    ● Studyin& and asterin& data structures a%%"wsy"u t" write r"&ras "re e##icient%y

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    10/12

     

    ,##iciency

    ● ,##iciency descries the h"w est use is ade"# the res"urces at hand

    ● 3n the study "# data structures' we easure

    e##iciency in ters "# tie and sace● /"w uch sace is re4uired t" st"re the dataA

    ● /"w uch tie is re4uired t" er#"r

    "erati"ns "n the dataA● Later we wi%% er#"r c"%eity ana%ysis a%s"

    8n"wn as Bi& O ana%ysis' t" deterinee##iciency "# the data structures we wi%% study

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    11/12

     

    Sace ,##iciency

    ● Su"se the !nited Eati"ns wants t" &ive eachers"n "n the %anet a uni4ue ers"na%identi#icati"n nuer

    ● Can we use an inte&er data tye t" st"re the idA

    ● $hin&s t" c"nsider> h"w any ers"ns are "nthe %anetA and What are the ran&e "# nuersan inte&er can st"reA

    ● Pr"s and C"ns. )ny"dy reeer F2GA

    ● Data tyes' their si7es' and ran&es wi%% ee%"red in the #irst %a

  • 8/15/2019 Data Structures Lecture 1 - Introduction 2013Aug27

    12/12

     

    $ie ,##iciency● Su"se we have three a%&"riths that er#"r

    the sae tas8 and r"duce the sae "utut

    ● $he #irst "ne is written in C:: and is runnin& "n a/P H220 w"r8stati"n runnin& Linu

    ● $he sec"nd "ne is written in (ava and is runnin&"n a De%% 3nsir"n *+ Lat" runnin& Wind"ws

    ● $he third "ne is written in Ojective C and isrunnin& "n a )%e Mac""8 Pr" runnin& OS I

    ● Which is the "st e##icient a%&"rith and which isthe %eastA

    ● W"u%d y"ur answer chan&e is we use a suer

    c"uter' an )ndr"id h"ne "r a B%ac8BerryA