121. Best Time to Buy and Sell Stock
121. Best Time to Buy and Sell Stock
Description
You are given an array prices
where prices[i]
is the price of a given stock on the i^th
day.
121. Best Time to Buy and Sell Stock
You are given an array prices
where prices[i]
is the price of a given stock on the i^th
day.
You are given an array of CPU tasks
, each labeled with a letter from A to Z, and a number n
. Each CPU interval can be idle or allow the completion of one task. Tasks can be completed in any order, but there’s a constraint: there has to be a gap of at least n
intervals between two tasks with the same label.
102. Binary Tree Level Order Traversal
Given the root
of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level).
84. Largest Rectangle in Histogram
Given an array of integers heights
representing the histogram’s bar height where the width of each bar is 1
, return the area of the largest rectangle in the histogram.