calculating max - min within for loop

前端 未结 0 1630
温柔的废话
温柔的废话 2021-01-12 09:53

I tried to do this exercise where the idea is, from an array of stock values, buy at the lower value and sell at the higher value.

Example: Input: [7,1,5,3,6,4] Outpu

相关标签:
回答
  • 消灭零回复
提交回复
热议问题