I want to find the index of the start up letter and then show the index of that item in array or array list in java. Example: I have:
String[] arr={"apple","at","book","bad","car","cat"};
when I input a: then i will get index =0, b: i will get index=2, c: i will get index=4
Because my array item is over 20,000 , so using linear Search is too slow. and my list is unsorted, so i can't use Binary Search also. I want to get index of the item like the example above, what can i solve with this?