Ad
  • Custom User Avatar
  • Custom User Avatar
    • Calculate the expected value before calling the user's function
    • Call the user's function on an array's copy

    Either one is good.

  • Custom User Avatar

    In "Sample Tests"?
    How can I to fix it?

  • Custom User Avatar

    The user can change the input array which will make your reference solution return a value known beforehand.

  • Custom User Avatar

    Hii! What do you mean?

  • Custom User Avatar

    Regarding the C translation:
    Even though the exercise description mentions there are 10 matches in the championship, I recommend adding a "size_t n" parameter to the function "int points(char* games[], size_t n)" with "n" representing the number of string elements within char* games[]. Doing so will explicitly include this information within the source code itself and represents a software engineering best practice when passing an array of strings to a function. Additionally, it offers beginning C Programmers a glance at size_t data structures.

  • Custom User Avatar

    Print str to see what it is.

  • Custom User Avatar

    My C code passes all of the static and random tests with the exception of:

    The expression (xo(str)) == (solution(str)) is false.

    Does anyone know what this error represents and what is being tested?