Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getProfit(list: number[]): number {
- const maxCost = Math.max.apply(null, list);
- const minCost = Math.min.apply(null, list);
- return maxCost - minCost;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement