© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
BI || CrescentThief

❔ Learning binary searching

i linked the txt file for my entire page
the part im stuck on is
        //
        // Part B-2: FindHero
        //      The method should have a string parameter for the name of the hero to find.
        //      Call the BinarySearch method from part A-3.
        //      Print the result.
        //      If the found index is -1,
        //          print "<insert heroName> is not found"
        //      otherwise
        //          print "<insert heroName> was found at index <insert found index>"
        //

        public void FindHero(String hero)
        {
            BinarySearch(_heroes);
        }
        //
        // Part B-2: FindHero
        //      The method should have a string parameter for the name of the hero to find.
        //      Call the BinarySearch method from part A-3.
        //      Print the result.
        //      If the found index is -1,
        //          print "<insert heroName> is not found"
        //      otherwise
        //          print "<insert heroName> was found at index <insert found index>"
        //

        public void FindHero(String hero)
        {
            BinarySearch(_heroes);
        }
message.txt10.2KB
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Binary Search
C#CC# / help
2y ago
❔ ✅ denary -> binary
C#CC# / help
3y ago
✅ Binary Formatter
C#CC# / help
4y ago
❔ searching mistake
C#CC# / help
3y ago