Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[FEATURE REQUEST] Add Booth's algorithm for lexicographically minimal string rotation

Offen
#7,643 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@vedant0517 arbeitet bereits daran.

Seit 11.10.2026.

  • #7644 von @vedant0517 — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
backend

Rechercherichtung

Start in the repository’s strings package and review existing string algorithms and their test conventions; the payload does not name specific files. Implement an O(n) method returning the smallest rotation’s starting index, with Javadoc and an algorithm reference. Add the requested edge case tests, then verify the “baca” example returns index 3.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I propose adding Booth's algorithm to the strings package to find the starting index of the lexicographically smallest cyclic rotation of a string.

Expected behavior

Return the starting index of the lexicographically smallest rotation.

Achieve O(n) time complexity.

Include tests for empty strings, single characters, repeated characters, periodic strings, and null input.

Include Javadoc and an algorithm reference.

Example

For "baca", the rotations are "baca", "acab", "caba", and "abac". The smallest rotation is "abac", starting at index 3.

This is distinct from checking whether one string is a rotation of another.

Vorherrschende Sprache
Java
Sterne
66.4k
Forks
21.3k
Ø Merge
11 Std. 16 Min.
Gemergte PRs (30 T.)
25

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TheAlgorithms/Java

Alle Issues in TheAlgorithms/Java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.