I want to implement an algorithm in Java to find the nearest similar Strings.
I have station_names in mysql database like - 23 ST, 233 ST, 21 ST, 14 St Times Sq, 24 ST
and if user enters a search string like 23rd station then I should return 23 ST and 233 ST or if user enters like Times Square then result should be 14 St Times Sq.
I found many algorithms on internet but I m confused to which one to use.
Can you please suggest me the best algorithm that can I implement in Java?
Thanks in advance