-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h2><a href="https://www.geeksforgeeks.org/problems/minimum-element-in-a-sorted-and-rotated-array3611/1">Sorted and Rotated Minimum</a></h2><h3>Difficulty Level : Difficulty: Easy</h3><hr><div class="problems_problem_content__Xm_eO"><p><span style="font-size: 18.6667px;">A sorted array<strong> </strong></span><span style="font-size: 18.6667px;">of distinct elements </span><strong style="font-size: 18.6667px;">arr[]</strong><span style="font-size: 18.6667px;"> is rotated at some unknown point, the task is to find the minimum element in it. </span></p> | ||
<p><span style="font-size: 14pt;"><strong>Examples:</strong></span></p> | ||
<pre><span style="font-size: 14pt;"><strong>Input: </strong>arr[] = [5, 6, 1, 2, 3, 4] | ||
<strong>Output: </strong>1 | ||
<strong>Explanation:</strong> 1 is the minimum element in the array.</span></pre> | ||
<pre><span style="font-size: 14pt;"><strong>Input: </strong>arr[] = [3, 1, 2] | ||
<strong>Output: </strong>1 | ||
<strong>Explanation:</strong> Here 1 is the minimum element.<br></span></pre> | ||
<pre><span style="font-size: 14pt;"><strong>Input: </strong>arr[] = [4, 2, 3] | ||
<strong>Output: </strong>2 | ||
<strong>Explanation:</strong> Here 2 is the minimum element.</span></pre> | ||
<p><span style="font-size: 14pt;"><strong>Constraints</strong>:<br>1 ≤ arr.size() ≤ 10<sup>6</sup><br>1 ≤ arr[i] ≤ 10<sup>9</sup></span></p></div><p><span style=font-size:18px><strong>Company Tags : </strong><br><code>Morgan Stanley</code> <code>Amazon</code> <code>Microsoft</code> <code>Samsung</code> <code>Snapdeal</code> <code>Adobe</code> <code>Times Internet</code> <br><p><span style=font-size:18px><strong>Topic Tags : </strong><br><code>Searching</code> <code>Algorithms</code> |