Answers for "linear search algorithm c#"

C#
0

linear search c#

static int LineSearch(int[] numbers, int num)
        {
            for (int i = 0; i < numbers.Length; i++)
            {
                if (numbers[i] == num)
                {
                    return i;
                }
            }
            return -1;
        }
Posted by: Guest on May-25-2021
0

linear search algorithm c#

static int LineSearch(int[] n,int num) {
        for(int i = 0; i < n.Length; i++)
            if(n[i] == num) return i;
        return -1;
    }
Posted by: Guest on June-02-2021

Code answers related to "linear search algorithm c#"

C# Answers by Framework

Browse Popular Code Answers by Language