- Implemented custom ticker tape type jQuery plugin to be used on Seismic Change Home Page for enabling dynamic text.
- Assisted with other changes including re-implementing Squarespace video hero with support for custom configuration including enabling the do not track feature on initial load.
- Helped to implement EU cookie and GDPR compliance.
Say we have an array of values that represents the stock price of duckduckgo over time.
const stocks = [1, 0, 5, 14, -1, 10];
How do we write a function that tells us what the biggest margin is? What is the optimal price that we can both buy and sell at? We cannot sell stock before we buy it.
One approach requires iterating though each number and calculate the delta of every price in the future to ensure that we only make comparisons going forward in time.
Here is an example