Page 20 - DCAP201_FUNDAMENTALS_OF_DATA_STRUCTURES
P. 20

Unit 1: Data Structures




             Another way to enter data is using the c() function. We will use this to enter the possible  Notes
             patterns and shades:
             > patternNames <- c(“pattern”, “plain”)
             > patternNames
             [1] “pattern” “plain”
             > shadeNames <- c(“light”, “dark”)
             > shadeNames
             [1] “light” “dark”
             All we have done so far is enter the possible values of these symbols.
             Question:
             What do you infer from the case?

          Source:  http://statmath.wu.ac.at/courses/data-analysis/itdtHTML/node80.html

          1.4 Summary


               A data structure is a particular way of storing and organizing data in a computer so that it
               can be used efficiently.

               Computer programmers decide which data structures to use based on the nature of the
               data and the processes that need to be performed on that data.
               A data type is a method of interpreting a pattern of bits.

               By a linear array, we mean a list of a finite number n of similar data elements referenced
               respectively by a set of n consecutive numbers, usually 1, 2, 3, …n.
               The stack is a common data structure for representing things that need to maintained in a
               particular order.
               A queue, also called a first-in-first-out (FIFO) system, is a linear list in which deletions can
               take place only at one end of the list, the “front” of the list, and insertions can take place
               only at the other end of the list, the “rear” of the list.

               A linked list, or one-way list, is a linear collection of data elements, called nodes, where
               the linear order is given by means of pointers.
               A tree is an acyclic, connected graph which contains no loops or cycles.

               A graph G may be defined as a finite set V of vertices and a set E of edges (pair of  connected
               vertices).

          1.5 Keywords

          Array: Array is a list of a finite number n of similar data elements referenced respectively by a
          set of n consecutive numbers, usually 1, 2, 3, …n.
          Data Structure: A data structure is a scheme for organizing data in the memory of a computer.

          Data Type: A data type is a method of interpreting a pattern of bits.
          Graph: A graph G may be defined as a finite set V of vertices and a set E of edges (pair of
          connected vertices).




                                           LOVELY PROFESSIONAL UNIVERSITY                                   13
   15   16   17   18   19   20   21   22   23   24   25