Ad
  • Custom User Avatar

    Recursion seems to be one of the solutions, once you have a blueprint

  • Custom User Avatar
  • Custom User Avatar

    Yeah i normal get the same issues in other challenges

  • Custom User Avatar

    public static int FindLongest(int[] number)
    {
    int longestnum = 0;
    foreach(int a in number)
    {
    longestnum = number.Max();
    }
    return longestnum;
    }
    // In your question, you are looking for the value with have the greatest value above all numbers in array.
    But what you kept was the answer when testing, was incorrect,
    such as 2,983,758 have a great value than [(2,268,174)-->
    this would display] as correct answer even though 2,983,758
    is greater than 2,268,174.