[FEATURE REQUEST] Add Booth's algorithm for lexicographically minimal string rotation
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 66.4k
- Forks
- 21.3k
- Merge moyen
- 11 h 16 min
- PR mergées (30 j)
- 25
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TheAlgorithms/Java
-
[FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit testsPeut-être à nouveau libre @Vivek-ML001 l’a pris il y a 56 jours, et aucune pull request n’est ouverte. Ouverteenhancement
TheAlgorithms/Java#7579 · 7 commentaires · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
[OTHER] Contributors Wanted for New Open-Source ProjectsPeut-être à nouveau libre @ankkrish l’a pris il y a 48 jours, et aucune pull request n’est ouverte. Ouvertehacktoberfest help wanted stale
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 1/100
TheAlgorithms/Java#7546 · 8 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Centralized Configuration ManagementPeut-être à nouveau libre @Eyablg-ops l’a pris il y a 35 jours, et aucune pull request n’est ouverte. Ouverteenhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
TheAlgorithms/Java#6974 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TheAlgorithms/Java
Issues similaires
-
[GLOBAL] Advancement resetOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
Vakore/ZappierGames#184 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
lugassawan/swe-workbench#823 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
cassiancc/Raspberry-Core#69 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
checkstyle/checkstyle#22145 ·
Les mainteneurs répondent en général sous 1 jour