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;`IDAT101%Ts@M[R>nB,22.9}Ma0г /,L: +v)@]KprYdzh]7 > e0aU艹Vpg%XC:a^M` #|X*̈!c#؝m_QI-,(u5Odz@6djrO| bf26.#Nr4 HKLE1+T١\Jʇ"R fq'"bTkT>VT)B,נEe諲.1R:"Vd_/F#(ԅp#D1?ba'lQIP]"C)ȭ0?(a?▐}ĀR B: n G G H$@%d1 mSⶐ}ĀA%[BA1 nG Hh!d1 dAAAAlIENDB`ngsRoman0 'K  ` .  @n?" dd@  @@`` 0(@r   -      ,b$j m->M/D۰c $ n3f3@8 sʚ;+4ʚ;g4YdYd@t@Xppp@ <4!d!d-gX<4dddd-gXg4`d`d4@@8p@ pp___PPT9\T(Y`bXZ&\D_Da&h___PPT2001D<4X?- 2003 WL Truppel ZCS 12: Intro. Computer Science II " Lecture 3O =P'Introduction to Data Structures: ArraysWagner Truppel Lecturer, Dept. of Computer Science & Engineering UC Riverside wagner@cs.ucr.edu http://www.cs.ucr.edu/~wagner http://www.cs.ucr.edu/cs12O  O`a~NB Announcements*If you have a question that is of interest to other students as well, please send it to the course mailing list In case you haven t been reading the course mailing list, you should start doing so! Home Programming Project 1 has been out since Sunday due date is 9 pm Mon Jan 20X >3Today s TopicsIntroduction to Data Structures: Arrays Searching through an array Linear & Binary search First look at Big-O notation C++ and statically defined arrayslC4"!4!gEIntroduction to Data Structures$ 0The  bookstore example How do you find the book you re looking for ? You need to use some kind of strategy and& *ZYZYhFIntroduction to Data Structures LThe  bookstore example How do you find the book you re looking for ? You need to use some kind of strategy and& & of course, we want the best strategy possible, but& *ZZiGIntroduction to Data Structures The  bookstore example How do you find the book you re looking for ? You need to use some kind of strategy and& & of course, we want the best strategy possible, but& & what  best means will depend on how the books are organized (stored)*ZZjHMessyBookPile, Inc. This bookstore keeps its books all in one big pile, with no organization of any kind Your strategy is then: For each book If it is not the book I want, continue searching If the bookstore has 1,000,000 books, and if it takes 10 secs for you to check each book, it may take you as long as 4 months to find the book you want Not a very good strategy, is it ? Note: search time is directly proportional to number of books: O(n)lZZ1ZZl1        8    =    ;            kILongBookShelf, Inc. This competitor bookstore keeps its books all in one very long array, sorted by ISBN One possible strategy is then (linear search): For each book If it is not the book I want, continue searching This is the same strategy used with MessyBookPile, Inc. Again& search time is directly proportional to number of books: O(n) Note that this strategy did not make use of the fact that the books are sortedZZ1ZZ?  1x              0   lJLongBookShelf, Inc. FAnother possible strategy is (binary search): Look at the middle book If it is the book I want, stop If the book I want comes before the middle book, search the first half of the array using this same strategy If the book I want comes after the middle book, search the second half of the array using this same strategy This does make use of the fact that the books are sorted Note: recursive strategy ! (more on this next week) Now& search time is proportional to the logarithm of the number of books: O(log2 n) 1,000,000 books, 10 secs/book = ???r.ZZZZ 8 @ '    0    X               "       mKLongBookShelf, Inc. Another possible strategy is (binary search): Look at the middle book If it is the book I want, stop If the book I want comes before the middle book, search the first half of the array using this same strategy If the book I want comes after the middle book, search the second half of the array using this same strategy This does make use of the fact that the books are sorted Note: recursive strategy ! (more on this next week) Now& search time is proportional to the logarithm of the number of books: O(log2 n) 1,000,000 books, 10 secs/book = 200 s < 4 min !!! [ 220 = 1,048,576 so log2(1,000,000) H" 20 ].ZZZZ-Z 8 @ '    0    X               "            GpNBottom line& tThe choice and efficiency of a strategy (called an algorithm in CS jargon) depends on how the data it accesses is organized Data structures are  containers for the data your program manipulates, much like built-in data types (int, float, etc), but more powerful All data structures have a natural set of operations that can be applied to it Data access (retrieving, setting, removing) Searching Each data structure implements these operations differently and, thus, have different efficiencies Big-O notation  measures that efficiency O(n) is slower than O(log2 n)XZ7ZZZ3 7 TxX C++ ArraysRepresentation in memory Static declaration Initialization Accessing array elements Stepping through an array Traps Arrays and functions$vT C++ ArraysContiguous chunks of memory All chunks must be of the same data type (int, float, or whatever), called the array base type Each chunk occupies the same number of bytes in memory Static declaration: int books[1000000]; // not 1,000,000 ! float dailyTemp[366]; Student cs12[100]; // Student is a custom // defined struct or class Better to use named constants: int books[MAX_NUM_BOOKS];Z uZZ uZkL97tF}* 1 'wU C++ Arrays yY C++ ArraysNInitialization At declaration time char vowels[5] = {  a ,  e ,  i ,  o ,  u }; int even[8] = { 2, 4, 6, 8, 10, 12, 14, 16 }; int odd[] = { 1, 3, 5, 7 }; // auto-sets size to 4 Stepping through Accessing array elements char v = vowels[3]; // sets v to ??? even[0] + 5; // evaluates to ??? ZZ ZZZF Z uZ nZ  F<+b C++ Arrays*Initialization At declaration time char vowels[5] = {  a ,  e ,  i ,  o ,  u }; int even[8] = { 2, 4, 6, 8, 10, 12, 14, 16 }; int odd[] = { 1, 3, 5, 7 }; // auto-sets size to 4 Stepping through Accessing array elements char v = vowels[3]; // sets v to  o , not  i !! even[0] + 5; // evaluates to 7 Array index always starts at zero And always ends at (array size - 1) Two different uses for brackets [ ]BZZ ZZZP ZFZ$Z  &'  $<+|zZ C++ Arrays|Stepping through // Initializing& const int ARRAY_SIZE = 8; int even[ARRAY_SIZE]; for (int k = 0; k < ARRAY_SIZE; k++) { even[k] = 2*(k + 1); } // Accessing& const int NUM_VOWELS = 5; char vowels[NUM_VOWELS] = {  a ,  e ,  i ,  o ,  u }; for (int i = 0; i < NUM_VOWELS; i++) { cout << vowels[i] << endl; }Z Z- uZ m    *M4 {[ C++ ArraysVTraps Index always starts with 0 and always ends with (array size - 1) C++ does not complain if you go past the end of the array& major source of bugs ! (Java complains)ZZ   /#|\C++ Arrays and functionsM You can pass array elements as function arguments by value void f1(char v); // takes a char by value by reference void f2(char& v); // takes a char by reference for (int i = 0; i < NUM_VOWELS; i++) { f1(vowels[i]); // uses vowels[i], but cannot change it f2(vowels[i]); // uses vowels[i], and may change it }X3Z Z Z+ uZ Z Z Z0 uZ Z uZ3  *      6gE}^C++ Arrays and functions> You can also pass the entire array as an argument to a function void f3(char a[ ], int size); // takes an array argument f3(vowels, NUM_VOWELS); // no [ ] here !! Array arguments behave almost like arguments passed by ref Args passed by ref include size information Array arguments do not include size informationBAZ Ze uZ Z;Z\ZA       ?,VW_C++ Arrays and functionsR Arguments passed by ref include size information void f(char& c); // takes a char by reference f(vowels[3]); f receives the address of vowels[0] (not of vowels[3] !!!) f is able to compute the address of vowels[3] since f knows how much memory the array base type occupies Address of vowels[3] = address of vowels[0] + 3*size(char)2Z> Z$Z uZiZ uZZ$ Z2      # 4          6;aC++ Arrays and functions Array arguments do not include size information void f(char a[ ]); // takes an array argument f(vowels); f receives the address of vowels[0] f knows how much memory the array base type occupies, but that s it& it doesn t know where the array ends Need to pass another argument: void f3(char a[ ], int size); // also takes the array size f3(vowels, NUM_VOWELS);1Z; ZZ ZW uZ      ).?`C++ Arrays and functions Functions cannot return arrays You ll learn how to  return arrays when we talk about pointerscZc,AtS Reminders (If you have not read these yet, make sure to do so: Savitch s chapter 5 handout 2: stack_frames.pdf You ll need them for home programming project 1 Check out Savitch s own slides for chapter 5 (available from cs12 page)v4Z3 nZyZ3 z>5 $: 5/PsxHH@Rg(HH(dh   ` www3ff` 3fff` ___>?" dF@,?n<d@uA @ " d`  n?" dd@   @@``PR   @ ` `P0p>> - 2003 WL Truppel ZCS 12: Intro. Computer Science II " Lecture 3 X( = 2  N?"! :    Npgֳgֳ ?"P  T Click to edit Master title style! !<  H0gֳgֳ ?"  RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S  Ngֳgֳ ?"`p  Z*    Ngֳgֳ ?"`   \*     Ngֳgֳ ?"`@  \*   N  6n޽h? ? www3ff $Blank Presentation1  - 2003 WL Truppel ZCS 12: Intro. Computer Science II " Lecture 3 +#  ( |  B  N1?"442  N?"! :    Ngֳgֳ ?"` D T Click to edit Master title style! !  Hgֳgֳ ?"P  D W#Click to edit Master subtitle style$ $  Npgֳgֳ ?"`p D Z*    Ngֳgֳ ?"`  D \*     N)gֳgֳ ?"`@ D \*   N  6n޽h? ?  www3ff$ P<f(  < < 0 { "P   ה R*   < 0@ "   ה T*  r < c $ ?"  ה$ < 0м " @ ה RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S < 60 "`P  ה R*   < 6 "`  ה T*  H < 0޽h ? ̙33> D( @ $  D D 0 "P   ה ACS 12 Lecture 3  D 0` "   ה T*   D 6 "`P  ה ACS 12 Lecture 3  D 6 "`  ה T*  H D 0޽h ? ̙33  0 L(  P   c $@U "0P D   c $ "P  D B  s *޽h ? 3ff   `PL(  P P c $¸"P  D  P c $¸" D B P s *޽h ? 33̙ff  N pL( 00//   c $p¸"P  D   c $Pĸ"` D B  s *޽h ? 33̙ff  N L(    c $0"P  D   c $PǸ" D B  s *޽h ? 33̙ff  g L(    c $Ƹ"P  D   c $pȸ" D B  s *޽h ? 33̙ff  h L(    c $"P  D   c $0" D B  s *޽h ? 33̙ff  i L(    c $&"  D   c $O" D B  s *޽h ? 33̙ff  j L(    c $R"  D   c $`R" D B  s *޽h ? 33̙ff  k L(    c $U"  D   c $T" D B  s *޽h ? 33̙ff  l L(    c $Q"  D   c $ V" D B  s *޽h ? 33̙ff  m L(    c $`U"  D   c $V"` D B  s *޽h ? 33̙ff  p L(  P   c $V"  D   c $@W"0 D B  s *޽h ? 33̙ff  x L(  %d   c $W"  D   c $X"` D B  s *޽h ? 33̙ff  x-HFigure 2002 Pearson Education, Inc. ZCS 12: Intro. Computer Science II " Lecture 3 wo  ( P    c $`"  D G pQ  $D @PH___PPT2001$  T  ?p YDisplay 5.2, page 178( x  C HA0D:\gifs\ch05\D05_02.gif0QB  s *޽h ? 33̙ff  x 0L( 00//   c $"  D   c $ "0 D B  s *޽h ? 33̙ff  y @8L( 00// 8 8 c $"  D  8 c $"0 D B 8 s *޽h ? 33̙ff   PL( 00//   c $"  D   c $"0 D B  s *޽h ? 33̙ff   `L( 00//   c $@"  D   c $"0 D B  s *޽h ? 33̙ff   p L( 00//     c $X"  D    c $Y"0 D B   s *޽h ? 33̙ff   (L( 00// ( ( c $["  D  ( c $`X"0 D B ( s *޽h ? 33̙ff   ,L( 00// , , c $"  D  , c $"0 D B , s *޽h ? 33̙ff   4L( 00// 4 4 c $"  D  4 c $@"0 D B 4 s *޽h ? 33̙ff   0L( 00// 0 0 c $"  D  0 c $`"0 D B 0 s *޽h ? 33̙ff  v L( 00//   c $"P  D   c $@" D B  s *޽h ? 33̙ff tl@H(  HR H 3 <   4r H # < @  4  H H 0޽h ? ̙33dxp^RЀ3ÿ lHbP  @AL G@;b `B&VuNOgp 3Yptv˔ĝ6\PάhDocumentSummaryInformation8Current User. Oh+'06 px  'GeneraleneeneWagner Truppelo85nMicrosoft PowerPointrP@ o@@S@@S@='G5PICT5 HH HH  nnnnnnnnnnnnnnnnggggsٶggggsnb,Jnm^ni,Inm^ne,Mnm^ne,2@inm^nq7gm7g7g 7gq7gm7g7g 7gnZ1nj,ne/nj,n_9nj,n_  cnj,nX'qݯPmӰPݯPe_ҮPҮӼ'qݯPmӰPݯPe_ҮPҮn'Z1jUd_KbnT"\iUeO^nneMVmnnmSOb/jUbnjUbn[LcnnT"\jUanneMVmnjUd_KbnT"\neMVmn_,nnC)nm[K[nnT"\nm[K[naqB -H.^ 9T(mjs-H}9B -H9e4x-H4xqB -H.^ 9T(mjs-H}9B -H9e4x-H4xnZ1]ZW(n? gn$/[:n\8nn.2n^6n?g]Znnn?gn_,n l4nl4naDq0^)Hk_um`u?^}Hk0 ^Hke<m-)^m-)Dq0^)Hk_um`u?^}Hk0 ^Hke<m-)^m-)nDZ1]iJ:_(gWX`Za@.d)i2/[:n\8nT)i2f_(g^6Za@.]iJ:n _(gnZa@.n_,n]/Vln_(g`/Vln^+qpyh|)mh})py h)e. f"hf"+qpyh|)mh})py h)e. f"hf"n+Z1]0n]4g-nW5nn>Nnm CQnZ/[9n[8n=Ong-n^6>Nnm ]0n]4n g-nn>Nnm n_,nnQ, ng-nnQ, naDqyg 4m߽g} 4y g 4e 5aBgaBDqyg 4m߽g} 4y g 4e 5aBgaBnDZ1]7n`4g,nWnnaI*n0R2ln>0/n158nnDGnn^6nR2l]7n`4n nnR2ln_Hnd bnd bn!?h"@i; 0BZnmdmneknjhnhknmenmdmneknmdmneknfmnmdmnnfmn+~Y[< -Qmnn(~z|>=f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miehnnnnnnnnnnnnnnnnnn~jglnnnnnnnnnnnnnnnnn4~arkiknnn$~ "lkmnn~mnn ~7MoqnnM~psnnnnnnnj~tqurnnnnnnnnnnz~6rwvnnnnnnnnnnnm~  syqnn nnnnnnnnn"~i{t{unn$~1u}|nn"~ āwӀsnn"~k ~xӂynn"~!:yӄnn"~ˁ!ҁz҇snn"~{"{҈{nn"~0"L|Ҋnn#~#}ьqnnn#~#~юznnn#~X$pёnnn#~$4ѓonn ~́%ՁЕunn4~%Зnnn~M&hИnnnnnnnnnnnnn~ &3 Кonnnnnnnnnn nnnnnnnnn~'Ϝvnnnnnnnnnnnnnn4~'Ϟnnn(~Yʀ'sϟnn~ (CϢn~(Σsn~)Υna~y)Φnnnnnnnnnʁ~G *f Ψnnnnnnnnnnnnnnn nnnnnnnn~ *= Ωnnnnnnnnnnnnnn nnnnnnnnnnnnń~*ͫtnnnnnnnnnnnnnnnnnnnnn7~+ͭnnn(~+ͮnn~W+tͯn~,,Qͱn~,1Ͳon~؄,߄̴xn~-̴n~-̶n~b-~̷n~?.b̸n~.D̹n~.˺pn~ԅ.܅˻znv~/˼nnnnnnnnnnnǁ~/˽nnnnnnnnnnnnnnnnnnnnn~| / ˾nnnnnnnnnnnnnn nnnnnnnnnnnnnn~_/}˿nnnnnnnnnnnnnnnnnn+~B0fnn(~'0Pnn~0=n~0on~0wn~͆0׆~n~1Ćn~1n~1n~1n~s1n~c1n~S1tn~F2kn~<2cn~32[nԁ~)2222222Snnnnnnnnnnnnnn~ 222222222L n nnnnnnnnnnnnnnnnnnnnnnnnn~22222Dnnnnnnnnnnnnn@~222?nnn~ 2=ņn~ 2:Ɔn~27Ɇn~25Ɇn~2ˆn ՜.+,D՜.+,4    'On-screen Showcn-skr Times New RomanArial WingdingsBlank Presentation(Introduction to Data Structures: ArraysAnnouncementsTodays Topics Introduction to Data Structures Introduction to Data Structures Introduction to Data StructuresMessyBookPile, Inc.LongBookShelf, Inc.LongBookShelf, Inc.LongBookShelf, Inc. Bottom line C++ Arrays C++ Arrays C++ Arrays C++ Arrays C++ Arrays C++ Arrays C++ ArraysC++ Arrays and functionsC++ Arrays and functionsC++ Arrays and functionsC++ Arrays and functionsC++ Arrays and functions Reminders  Fonts UsedDesign Template Slide Titles 8@ _PID_HLINKS'AHmailto:Wagner@cs.ucr.eduhttp://www.cs.ucr.edu/~wagnerhttp://www.cs.ucr.edu/cs12&_CTWagner TruppelRdO)@Pictures/DPowerPoint Document(<SummaryInformation(7'  !"#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwyz{|}~DocumentSummaryInformation8Current User. &_Wagner Truppel