Ad
  • Custom User Avatar

    Don't post code here, use that kata discourse and mark your post as having spoiler content.

  • Custom User Avatar

    Don't post code here, use that kata discourse and mark your post as having spoiler content.

  • Default User Avatar

    i have to find an integer which appears an odd number of times in an array. what am i doing wrong.help!

    public class FindOdd
    {
    public static int findIt(int[] a)
    {
    int odd,b;
    for(int i=0;i<a.length;i++)
    {
    odd=1;
    b=a[i];
    for(int j=i+1;j<a.length;j++)
    {
    if(b==a[j])
    {
    odd++;
    }
    }
    if(odd%2!=0)
    break;
    else
    continue;
    }
    return b;
    }
    }

  • Custom User Avatar

    I have passed 28 tests but failed 4 tests for - "Playing with digits" kata.
    I don't find the correct solution anywhere on the site.
    Wanted to check if the correct solution is available after attempting a kata or no?