Ad
  • Default User Avatar

    If the integersList has only one item, this piece of code "integersList.join().split(digitsList[i]).length -1" does not give zero?

  • Custom User Avatar

    If you're entirely stumped it's not a bad idea actually to unlock the solution. However, make sure you take the time to analyze the solutions of other users until you understand what you were getting stuck on. Once you feel like you have a solid understanding of what you were missing, attempt to solve the kata again (even without the reward incentive) without having to look back at the solutions. Otherwise, there's not much benefit to unlocking them. If you're concerned about losing out on potential honor, there's over 5k challenges on the website, so it's not really a big deal if you can't get points for a few of the harder ones.

    Remember to utilize the language's documentation and other resources if you get stuck before unlocking the solution though. Often times what I'll do is bookmark the challenge I'm stuck on, and spend some time doing research on it. If it still doesn't come to me, I'll bookmark the kata and attempt to solve it later, usually I come back at it later with some new ideas. In most cases, this works out for me. But, I've had to unlock solutions a few times, especially when I first started the 4kyu+ optimization challenges.

  • Custom User Avatar

    thanks buddy

  • Default User Avatar

    Rote learning is always dangerous because it often leads to "going through the motion" scenario.
    You see but do not perceive.
    If you do not have photographic memory, I suggest that you repeat the exercises few weeks later after your memory of the respective solutions fade away.

  • Custom User Avatar

    restore down your browser window

  • Default User Avatar

    The way I see it is that as long as you learn from doing so, then that's all that really matters. I've done it myself once but made sure I fully understood it, made notes and reflected on it before I moved on.

  • Default User Avatar

    No, but you should spend time studying other users solutions.

  • 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?

  • Custom User Avatar

    Write in that kata's discussion, not here. And mark your post as having spoiler content there (can't be done here).

  • Default User Avatar

    is this a bad habit that if i can't solve a kata for 1 or 2 days than i unclock the solution and practice and learn from it afterwards?

  • Default User Avatar

    i have passed 26 tests but 6 tests are failing plz tell me what am i doing wrong

    this is my code of "Split an array" kata...

    function split(arr, prop) {

    //ceate an array

    let returnArray = [[],[]];

    //iterate through all the object in the array

    for(let i = 0; i < arr.length; i ++){
    //compare the prop

    if(arr[i][prop] && arr[i][prop] !== false && arr[i][prop] !== 0 && arr[i][prop] != "" && arr[i][prop] != null && arr[i][prop] !== undefined && arr[i][prop] != NaN){
    
      //if it is true than first object of the array is the given object 
    
      returnArray[0].push(arr[i]);
    
    } 
    
    if((arr[i][prop] === null && arr[i][prop] !== true && arr[i][prop] == "" && arr[i][prop] === undefined && arr[i][prop] == NaN) || !arr[i][prop] || arr[i][prop] === 0){
    
      //if it is false than second object of the array is the given object
    
      returnArray[1].push(arr[i]);
    
    }
    	
    }
    
    //return the array	
    return returnArray;
    

    }

  • Default User Avatar

    is it a bad habit that if I could not solve one problem for 1 or 2 days than i should click on unlock solution??

  • Default User Avatar

    help me bro I search about truthy and falsy after that i have managed to pass 26 test but still 6 tests are not passing i am very serious about this kata and i don't wanna look at the solution....... plz give me some hints

  • Loading more items...