Skip to content

Commit 6a34cc3

Browse files
committed
Create README - LeetHub
1 parent 17c890a commit 6a34cc3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

3133-minimum-array-end/README.md

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/minimum-array-end/">3133. Minimum Array End</a></h2><h3>Medium</h3><hr><div><p>You are given two integers <code>n</code> and <code>x</code>. You have to construct an array of <strong>positive</strong> integers <code>nums</code> of size <code>n</code> where for every <code>0 &lt;= i &lt; n - 1</code>, <code>nums[i + 1]</code> is <strong>greater than</strong> <code>nums[i]</code>, and the result of the bitwise <code>AND</code> operation between all elements of <code>nums</code> is <code>x</code>.</p>
2+
3+
<p>Return the <strong>minimum</strong> possible value of <code>nums[n - 1]</code>.</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">n = 3, x = 4</span></p>
10+
11+
<p><strong>Output:</strong> <span class="example-io">6</span></p>
12+
13+
<p><strong>Explanation:</strong></p>
14+
15+
<p><code>nums</code> can be <code>[4,5,6]</code> and its last element is 6.</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">n = 2, x = 7</span></p>
22+
23+
<p><strong>Output:</strong> <span class="example-io">15</span></p>
24+
25+
<p><strong>Explanation:</strong></p>
26+
27+
<p><code>nums</code> can be <code>[7,15]</code> and its last element is 15.</p>
28+
</div>
29+
30+
<p>&nbsp;</p>
31+
<p><strong>Constraints:</strong></p>
32+
33+
<ul>
34+
<li><code>1 &lt;= n, x &lt;= 10<sup>8</sup></code></li>
35+
</ul>
36+
</div>

0 commit comments

Comments
 (0)