I need to implement something like a running order list to store and retrieve unique Strings, e.g.
1, Orange
2, Apple
3, Pear
4, Durian
If I want to know the index for Pear, it should return me a 3. Subsequently, if I delete Apple, it should return a 2 and 3 when I search for Pear and Durian respectively. Any idea how I can implement a extremely fast algo to get back the indexes as I have millions for records? Thanks!