mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	国外版
This commit is contained in:
		
							
								
								
									
										25
									
								
								算法题(国外版)/three-consecutive-odds.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								算法题(国外版)/three-consecutive-odds.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
Given an integer array <code>arr</code>, return <code>true</code> if there are three consecutive odd numbers in the array. Otherwise, return <code>false</code>.
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Example 1:</strong></p>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
<strong>Input:</strong> arr = [2,6,4,1]
 | 
			
		||||
<strong>Output:</strong> false
 | 
			
		||||
<b>Explanation:</b> There are no three consecutive odds.
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
<p><strong>Example 2:</strong></p>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
<strong>Input:</strong> arr = [1,2,34,3,4,5,7,23,12]
 | 
			
		||||
<strong>Output:</strong> true
 | 
			
		||||
<b>Explanation:</b> [5,7,23] are three consecutive odds.
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Constraints:</strong></p>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
	<li><code>1 <= arr.length <= 1000</code></li>
 | 
			
		||||
	<li><code>1 <= arr[i] <= 1000</code></li>
 | 
			
		||||
</ul>
 | 
			
		||||
		Reference in New Issue
	
	Block a user