A bus comes every 15 minutes: the first at first minutes past the hour, the last no later than last. Write BusTimes(first, last) to return the minute of each bus in order (one at exactly last counts). If first is bigger than last, return an empty slice.
BusTimes(0, 45)→[0, 15, 30, 45]BusTimes(10, 30)→[10, 25]func BusTimes(first, last int) []intpackage main
func BusTimes(first, last int) []int {
times := []int{}
// your code here: for from first, adding 15 each time, putting each bus in times
return times
}
Run tries the examples. When they look right, Submit.