Best Time to Buy and Sell Stock II Solutions in GoNumber 122Difficulty EasyAcceptance 57.1%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func maxProfit122(prices []int) int { profit := 0 for i := 0; i < len(prices)-1; i++ { if prices[i+1] > prices[i] { profit += prices[i+1] - prices[i] } } return profit}package leetcode func maxProfit122(prices []int) int { profit := 0 for i := 0; i < len(prices)-1; i++ { if prices[i+1] > prices[i] { profit += prices[i+1] - prices[i] } } return profit }