From the course: Go Essentials: Concurrency, Connectivity, and High-Performance Apps

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Solution: Find the maximal value

Solution: Find the maximal value

(upbeat music) - [Instructor] Here is my solution. I've commented out the printing of the numbers. We initialized max with the first number, so this is nums at zero location, and then, I'm using a slicing notation to start from the second value in the follow-up. I'm using underscore in value to get just the values since I don't care about the indexes. And if the current value is bigger than max, I'm assigning max to this value, and finally, printing out the maximal value. And when we run it, we see that we get 42.

Contents