[FEATURE REQUEST] Add Booth's algorithm for lexicographically minimal string rotation
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 66.4k
- Forks
- 21.3k
- Merge médio
- 11h 16min
- PRs com merge (30d)
- 25
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TheAlgorithms/Java
-
[FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit testsTalvez livre de novo @Vivek-ML001 assumiu há 56 dias e não há nenhum pull request aberto. Abertaenhancement
TheAlgorithms/Java#7579 · 7 comentários · 2 responsáveis ·
Mantenedores costumam responder em até 1 dia
-
[OTHER] Contributors Wanted for New Open-Source ProjectsTalvez livre de novo @ankkrish assumiu há 48 dias e não há nenhum pull request aberto. Abertahacktoberfest help wanted stale
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 1/100
TheAlgorithms/Java#7546 · 8 comentários ·
Mantenedores costumam responder em até 1 dia
-
Centralized Configuration ManagementTalvez livre de novo @Eyablg-ops assumiu há 35 dias e não há nenhum pull request aberto. Abertaenhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
TheAlgorithms/Java#6974 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TheAlgorithms/Java
Issues semelhantes
-
[GLOBAL] Advancement resetAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
Vakore/ZappierGames#184 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
lugassawan/swe-workbench#823 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
cassiancc/Raspberry-Core#69 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
checkstyle/checkstyle#22145 ·
Mantenedores costumam responder em até 1 dia