Question 11

Situation – You have millions of records(Strings) and user is typing “abc” in search box . Your task is to display strings from records in the sequence.

e.g String in the record contain “abc” starting should appear first, then string which has “abc” in the second, should apprear later as below.

String – fabcsdf,asdfabc,dfadsfsdfabc,abckdf,ddfabc…

Displays suggestion like….

abckdf

fabcsdf

ddfabc

asdfabc

dfadsfsdfabc

Question – Which data structure you would use to stor this ?

And how will you implement to get this(shorted) result.

KodNest Training New Batch is starting on 15th July 2020Check Now

New Report

Close