๐งฌ ์๊ณ ๋ฆฌ์ฆ/leetcode
[Leetcode][JS] 1630. Arithmetic Subarrays
1630. Arithmetic Subarrays ๋ฌธ์ ์ต์ ๋ ๊ฐ์ ์์๋ก ๊ตฌ์ฑ๋์ด์๋ ๊ฒฝ์ฐ, ์ฐ์์ ์ธ ๋๊ฐ์ ์์์ ์ฐจ์ด๊ฐ ๋์ผํ๋ฉด arithmeticํ๋ค๊ณ ํ๋ค s[i + 1] - s[i] == s[1] - s[0] ์ธ ๊ฒฝ์ฐ, artimeticํ๋ค ๋๋ณด๊ธฐ A sequence of numbers is called arithmetic if it consists of at least two elements, and the difference between every two consecutive elements is the same. More formally, a sequence s is arithmetic if and only if s[i+1] - s[i] == s[1] - s[0] for all vali..