There's a queue at the post office counter; queue[0] is being served and the next people should get ready. Write NextUp(queue) to return the next two. queue has at least 1 person; if fewer than two are waiting, return those there are, or an empty slice.
NextUp([]string{"Ana", "Ben", "Cai", "Dee"})→['Ben', 'Cai']NextUp([]string{"Ana", "Ben"})→['Ben']func NextUp(queue []string) []stringpackage main
func NextUp(queue []string) []string {
next := queue[1:]
// your code here: more than 3 people? change next to queue[1:3]
return next
}
Run tries the examples. When they look right, Submit.