Skip to content

Commit 06ea4a9

Browse files
committed
Create README - LeetHub
1 parent 638dae5 commit 06ea4a9

File tree

1 file changed

+36
-0
lines changed
  • 3423-maximum-difference-between-adjacent-elements-in-a-circular-array

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<h2><a href="https://leetcode.com/problems/maximum-difference-between-adjacent-elements-in-a-circular-array/?envType=daily-question&envId=2025-06-12">3423. Maximum Difference Between Adjacent Elements in a Circular Array</a></h2><h3>Easy</h3><hr><p>Given a <strong>circular</strong> array <code>nums</code>, find the <b>maximum</b> absolute difference between adjacent elements.</p>
2+
3+
<p><strong>Note</strong>: In a circular array, the first and last elements are adjacent.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<div class="example-block">
9+
<p><strong>Input:</strong> <span class="example-io">nums = [1,2,4]</span></p>
10+
11+
<p><strong>Output:</strong> <span class="example-io">3</span></p>
12+
13+
<p><strong>Explanation:</strong></p>
14+
15+
<p>Because <code>nums</code> is circular, <code>nums[0]</code> and <code>nums[2]</code> are adjacent. They have the maximum absolute difference of <code>|4 - 1| = 3</code>.</p>
16+
</div>
17+
18+
<p><strong class="example">Example 2:</strong></p>
19+
20+
<div class="example-block">
21+
<p><strong>Input:</strong> <span class="example-io">nums = [-5,-10,-5]</span></p>
22+
23+
<p><strong>Output:</strong> <span class="example-io">5</span></p>
24+
25+
<p><strong>Explanation:</strong></p>
26+
27+
<p>The adjacent elements <code>nums[0]</code> and <code>nums[1]</code> have the maximum absolute difference of <code>|-5 - (-10)| = 5</code>.</p>
28+
</div>
29+
30+
<p>&nbsp;</p>
31+
<p><strong>Constraints:</strong></p>
32+
33+
<ul>
34+
<li><code>2 &lt;= nums.length &lt;= 100</code></li>
35+
<li><code>-100 &lt;= nums[i] &lt;= 100</code></li>
36+
</ul>

0 commit comments

Comments
 (0)