Sizga satrlar massivi sentences berilgan. Har bir element so'zlari orasida bo'sh joy bo'lgan bitta gapni bildiradi.
Jamlangan so'zlar bo'yicha eng ko'p so'z qatnashgan gapni topib, uning ichidagi so'zlar sonini qaytaring.
func solve(sentences []string) int {
// ...
}
Input: sentences = ["alice and bob love leetcode", "i think so too", "this is great thanks very much"]
Output: 6
Tushuntirish:
1-gap: 5 so'z
2-gap: 4 so'z
3-gap: 6 so'z. Maksimal so'zlar soni 6 ga teng.
Input: sentences = ["please wait", "continue to fight", "continue to win"]
Output: 3
Input: sentences = ["a"]
Output: 1
Input: sentences = ["a b c", "d e", "f g h i"]
Output: 4
strings.Fields), hosil bo'lgan bo'laklar sonini hisoblang va barcha gaplar ichidan eng kattasini saqlab boring.