五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

leetcode 1550 Three Consecutive Odds

2022-03-07 21:14 作者:您是打尖兒還是住店呢  | 我要投稿

Given an integer array?arr, return?true?if there are three consecutive odd numbers in the array. Otherwise, return?false.

?

Example 1:

Input: arr = [2,6,4,1]Output: falseExplanation: There are no three consecutive odds.

Example 2:

Input: arr = [1,2,34,3,4,5,7,23,12]Output: trueExplanation: [5,7,23] are three consecutive odds.

?

Constraints:

  • 1 <= arr.length <= 1000

  • 1 <= arr[i] <= 1000

就是循環(huán)一次,max記住一下連續(xù)最多的奇數(shù)的數(shù)量,然后大于等于3返回true;否則false;

Runtime:?0 ms, faster than?100.00%?of?Java?online submissions for?Three Consecutive Odds.

Memory Usage:?42.5 MB, less than?41.25%?of?Java?online submissions for?Three Consecutive Odds.


leetcode 1550 Three Consecutive Odds的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
普兰县| 微山县| 沾化县| 兴山县| 宁陕县| 龙泉市| 新建县| 石家庄市| 安国市| 开原市| 陈巴尔虎旗| 玉龙| 松潘县| 邓州市| 阿坝县| 安龙县| 南召县| 嘉兴市| 新干县| 高安市| 金溪县| 武宁县| 绥滨县| 甘孜| 岑巩县| 缙云县| 当阳市| 菏泽市| 永德县| 黄梅县| 临江市| 乐亭县| 钦州市| 天祝| 宜宾市| 金溪县| 夏河县| 莱芜市| 马龙县| 将乐县| 杂多县|