This is a heavily interactive web application, and JavaScript is required. Simple HTML interfaces are possible, but that is not what this is.
Post
David McCoy
davidmccoy.com
did:plc:66f7umqe44p727pjuzhx4dl4
const getMaxProfit = (values) => {
let maxProfit = 0
let left = 0
let right = 0
while (left < values.length) {
if (values[left] >= values[left + 1]) {
left++
}
right = left +1
while (right < values.length && values[right] > values[left]) {
2024-11-18T07:46:55.514Z