Question 1 -
Problem Description:
You are given a sorted array that has been rotated at an unknown pivot. Your task is to find the minimum element in the array in O(log n) time complexity.
Constraints:
The array was originally sorted in increasing order before rotation.
The array does not contain duplicates.
You must solve it in O(log n) time complexity.
Question 2 -
You are an avid rock collector living in Southern California (SoCal). Recently, a batch of rare and valuable rocks has become available in New York (NY), and you decide to embark on a cross-country road trip to collect as many rare rocks as possible along the way.
Problem Description
You are given a grid of size m × n, where:
Each cell (i, j) represents a city with a certain number of rare rocks.
Your goal is to travel from SoCal (bottom-left corner of the grid) to New York (top-right corner).
You can only move up (↑) or right (→).
Objective
Find the optimal path that collects the maximum number of rocks while following the movement constraints.