This relation is a function, because you are assigning one y-value to each x-value. In other words, you can perform the vertical line test: you can see that every vertical line crosses the graph at most once.
D-median, because the presence of an outlier affect the data

has CDF

where

is the CDF of

. Since

are iid. with the standard uniform distribution, we have

and so

Differentiate the CDF with respect to

to obtain the PDF:

i.e.

has a Beta distribution

.
468
You can get this by finding the area of each individual rectangle.