6 kyu

Single character palindromes

727 of 2,133KenKamau
Description
Loading description...
Algorithms
View
AllIssues5QuestionsSuggestions4Show Resolved
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • ejini战神 Avatar

    C#: method name should be PascalCase (Please refer to implementation of backward compatibility here )

  • tomask272 Avatar

    Very nice Kata, thank you :) No problem with tests.

  • Belator Avatar

    I have a solution, but in the Random test doesnt work well. All basic test work well,and IntelijIdea work well with random words.

  • victorpinto123 Avatar

    I have a solution, but in the Random test doesnt work well.

    In jupyter notebook whatever , work well... With random words!!!!!! Why?

  • prodigi0706 Avatar

    Using python, can expressions not be used for slice indices? I understand expressions can be used wherever values can also be used

    like so, trying this in my solution to check if string is already a palindrome: if s[:len(s)/2 + 1] == s[len(s)/2:]: return "OK" I get: "TypeError: slice indices must be integers or None or have an index method"

  • crownedfoxes Avatar

    I'm using Javascript, and my code passed the initial tests, but when I go to attempt the kata, I get a bunch of fails. The issue is that all the ones I looked at gave what should have been the correct answer, but it was telling me it was wrong/expecting the wrong answer.

    This also happened with one of the initial tests, which was expecting the wrong answer; that tripped me up for quite a while.

  • devilishBurrito Avatar

    I'm a bit confused. I am running these tests that I fail on my same code in Jupyter and it returns the correct response but here I seem to get a response that isn't correct / aligned with what I got in my own testing outside this site... any thoughts?

    for example in jupyter: solve("abcdba") 'remove one'

    but here the same code gives: 'not possible' should equal 'remove one'

    I keep failing this one edgecase and then a handful of random tests. they all work in jupyter tho so I'm at a lose here

  • imjasonmiller Avatar
  • HalcefeR Avatar

    I think the time complexity of O(n) in not optimal for large strings and we can find wrong character with the time complexity of O(logn)

  • dagolinuxoid Avatar

    Finally solved it. I always experience good feelings after solving one of your's kata which I wasn't be able to tackle at first try.

  • dagolinuxoid Avatar

    A little typo : and you task -> and your task

  • bestwebua Avatar

    Awesome kata, thanks!!! :)

  • Unnamed Avatar

    In Scala: assert(solve(null) == "not possible") Really? Nulls shouldn't usually be a valid input, definitely shouldn't be when the behaviour isn't obvious, and in a functional language they just must not be.

  • Blind4Basics Avatar

    This comment has been hidden.