(10 points)
Consider the following ADT for a one-dimensional array
of strings.
Data:
a function whose domain is the set {0, 1, ..., n-1}
and whose range is the set of strings (over the ASCII character set).
Operations:
STORE -- puts a string in a particular array location.
ACCESS -- returns a string from a particular array location.
(a) Let fs be a function representing the STORE operation.
Identify the domain and range of fs.
Give a formula that shows how fs maps an element of its domain
to the corresponding element of its range.
(b) Let fa be a function representing the ACCESS operation.
Identify the domain and range of fa.
Give a formula that shows how fa maps an element of its domain
to the corresponding element of its range.