{"version":"1.0","type":"rich","title":"Gist b689a7936ed9a079b7ee6820498a75aa","description":"This example shows three JavaScript implementations of the stock profit maximization problem, each computing the maximum profit from a list of daily prices. The code compares a brute-force O(N²) approach, a greedy O(N) solution, and an optimized single-pass method that tracks the minimum price and maximum sum. The visualization uses no external libraries, relying solely on plain JavaScript arithmetic and array iteration to demonstrate algorithmic differences. The data source is a hardcoded price array, and the rendering approach is absent, as the example focuses on code logic rather than graphical output.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-b689a7936ed9a079b7ee6820498a75aa?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}