Ad
  • Custom User Avatar

    Feeling not so good right now haha. Just insane!

  • Custom User Avatar

    I just passed this in C and I'm socked at how bad my solution was. It was just a complete over complication of a very simple math related question. I really need to improve my math intuition on questions like these. Thanks for this great kata!

  • Custom User Avatar

    Ok, I will look into it. Thanks so much for the help!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I hope to ask someone for help with this problem. I implemented a solution in C but during the random tests, one or more of the tests fail. Looking into my solution I'm very sure that the code is solving the problem correctly. Here are some results from my code, using random inputs of my own:

    input: abcdefghijklmnopqrstuvwxyz
    output: 
     AbCdEfGhIjKlMnOpQrStUvWxYz
     aBcDeFgHiJkLmNoPqRsTuVwXyZ
    
    input: okwwkspoginevairavzasqukvubmhkjq
    output: 
     OkWwKsPoGiNeVaIrAvZaSqUkVuBmHkJq
     oKwWkSpOgInEvAiRaVzAsQuKvUbMhKjQ
    
    input: mgewjuzacjjlkyjlxcirwxwtwjwwiaxh
    output: 
     MgEwJuZaCjJlKyJlXcIrWxWtWjWwIaXh
     mGeWjUzAcJjLkYjLxCiRwXwTwJwWiAxH
    
    input: mgewj   uzacjjlkyjlxcirwxwt   wjwwiaxh
    output: 
     MgEwJ   UzAcJjLkYjLxCiRwXwT   WjWwIaXh
     mGeWj   uZaCjJlKyJlXcIrWxWt   wJwWiAxH
    
    input: 9{cym.gftj&$nb8e
    output: 
     9{CyM.GfTj&$Nb8e
     9{cYm.gFtJ&$nB8E
    
    input: jku72&bs_j-63dr@a?#7x54?a^y
    output: 
     JkU72&Bs_j-63dR@A?#7X54?A^Y
     jKu72&bS_J-63Dr@a?#7x54?a^y
    
    input: rq7Ej#ahHXgJ2+q#
    output: 
     Rq7eJ#AhHxGj2+Q#
     rQ7Ej#aHhXgJ2+q#
    

    What am I missing? Thanks!

  • Custom User Avatar

    No need to apologize :-)

  • Custom User Avatar

    Thank you very much for the information. I'm new to Java and am still learning. You are correct I'm really not sure why I did this but now after reading your comment I can see how stupid it was. Thanks once again.

  • Custom User Avatar

    Good example of return statements and codeflow for bigginers. I Like :-)