---
title: "Discussion on \"Find Max In Rotated Sorted Array (medium)\" | Hashnode"
description: "Discussion on \"Find Max In Rotated Sorted Array (medium)\". class Solution {\npublic:\n    int findMin(vector<int>& nums) {\n\n        int n = nums.size() - 1;\n        if (nums[0] <= nums[n])\n        {\n            return nums[0];\n        }\n\n        int l = 0, r = n, m = 0;\n\n        while(l <= r)\n        {\n       ..."
url: "https://hashnode.com/posts/find-max-in-rotated-sorted-array-medium/6670a8f4adf55e9ae9cc916c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Find Max In Rotated Sorted Array (medium)](https://ashirmehmood.hashnode.dev/find-max-in-rotated-sorted-array-medium?utm_source=hashnode&utm_medium=feed)

class Solution { public: int findMin(vector<int>& nums) { int n = nums.size() - 1; if (nums\[0\] <= nums\[n\]) { return nums\[0\]; } int l = 0, r = n, m = 0; while(l <= r) { ...

Jun 17, 2024 · 1 min read · ashirmehmood.hashnode.dev  
Read the article

## Written by

[Ashir](https://hashnode.com/@AshirMehmood)

@AshirMehmood

  
[View profile](https://hashnode.com/@AshirMehmood)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
