Amazon interview question

includes duplicate 2 pointer graph, design a typesearch for a web page.