Showing 3 of 12 questions
Find two numbers in a given array that add up to a specific target value, and return their indices. Essentially, you need to efficiently locate the pair that satisfies the sum requirement.
#1. Two Sum
Given an array representing the height of bars, calculate how much water can be trapped between them after rain. Think about finding the maximum height to the left and right of each bar.
#2. Trapping Rain Water
You're given daily stock prices. Find the maximum profit you can make by buying and selling the stock once. You must buy before you sell.
#3. Best Time to Buy and Sell Stock
Page 1 of 1 · 12 total