Answer: 135
Explanation:
Given : The total number of alphabets { x , y , z } = 3
The number of possible strings when the first place is occupied by z:_

The number of possible strings when the last place is occupied by z:_

The number of possible strings when the first and the last place is occupied by z:_

Now, the number of possible strings where either begin with z or end with z:-

Hence, the number of strings of length 5 are there over the alphabet { x , y , z } that either begin with z or end with z =135