{"version":"1.0","type":"rich","title":"Algorithm 1","description":"This example demonstrates the computational complexity of nested loops versus single loops, using JavaScript’s console.log to output results of multiplication operations. The code defines constants and variables to illustrate constant-time operations (O(1)), then shows a single for loop executing in linear time (O(n)), followed by a double for loop with a nested inner loop that runs in quadratic time (O(n^2)). It also includes a second nested loop with an additional constant-time operation, representing c1 * O(n^2). The example uses basic JavaScript syntax with no external libraries, relying on the browser’s console for output.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/31cb1d6763c64b069758b4b0f9bc6ada?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}