Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Keep sorted suggestions at each node while inserting products, so each typed character returns precomputed top 3 without full rescanning.
Sorting first and maintaining capped suggestion lists gives fast lookup per character and constant per-result retrieval at query time.
Updated Feb 2026