❔ I need help with Binary search alphabetically
Guys, I have this assignment where they want me to implement this Binary search algo
Console.WriteLine("\n\tWhich letter should the search start with?");
string key = Console.ReadLine(); ; // Receives the user's search
if (key.Length <= 0) key = "a"; // Makes sure the search is always something, in this case "a"
/*
* BINARY SEARCH using letters
*
* Based on the new tools we've gone through before (CompareTo and extracting single chars from strings for comparisons) so
* here we should write a binary search to look for letters.
*
*/
LetterPrint(wordList); // Print the entire list using our method.Console.WriteLine("\n\tWhich letter should the search start with?");
string key = Console.ReadLine(); ; // Receives the user's search
if (key.Length <= 0) key = "a"; // Makes sure the search is always something, in this case "a"
/*
* BINARY SEARCH using letters
*
* Based on the new tools we've gone through before (CompareTo and extracting single chars from strings for comparisons) so
* here we should write a binary search to look for letters.
*
*/
LetterPrint(wordList); // Print the entire list using our method.