Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wrong palindrome implementation #12941

Open
Labels
@sibebleuze

Description

Repository commit

9d52683

Python version (python --version)

Python 3.13.7

Dependencies version (pip freeze)

/

Expected behavior

in https://github.com/TheAlgorithms/Python/blob/master/strings/palindrome.py
function is_palindrome_recursive - first if statement is wrong - not all 2 letter strings are palindromes
should be if len(s) <= 1: return True

> is_palindrome_recursive('abcdba')
False

Actual behavior

> is_palindrome_recursive('abcdba')
True

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /