[FEATURE REQUEST] Add Booth's algorithm for lexicographically minimal string rotation
維護者通常 1 天內回覆
評估
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Java
- 星號
- 66.4k
- 分支
- 21.3k
- 平均合併
- 11 小時 16 分鐘
- 30 天內合併 PR
- 25
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TheAlgorithms/Java 的其他 Issue
-
[FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit tests可能重新可做 @Vivek-ML001 於 56 天前認領,目前沒有進行中的 PR。 未關閉enhancement
TheAlgorithms/Java#7579 · 7 則留言 · 已指派 2 人 ·
維護者通常 1 天內回覆
-
[OTHER] Contributors Wanted for New Open-Source Projects可能重新可做 @ankkrish 於 48 天前認領,目前沒有進行中的 PR。 未關閉hacktoberfest help wanted stale
難度 5/5 一週以上 新手友好度 1/100
TheAlgorithms/Java#7546 · 8 則留言 ·
維護者通常 1 天內回覆
-
Centralized Configuration Management可能重新可做 @Eyablg-ops 於 35 天前認領,目前沒有進行中的 PR。 未關閉enhancement
難度 5/5 一週以上 新手友好度 20/100
TheAlgorithms/Java#6974 · 3 則留言 ·
維護者通常 1 天內回覆
查看 TheAlgorithms/Java 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
NationalSecurityAgency/ghidra#9997 · 2 則留言 ·
維護者通常 2 天內回覆
-
[Bug] DefaultSerializationExceptionWrapper does not implement Cleanable, so cleanup() is never invoked by codecs可能已有人在做 @binbin0325 今天認領。 未關閉component/need-triage type/need-triage
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
2026 Error Report
難度 2/5 1-3 小時 新手友好度 68/100
triplea-game/triplea#15096 ·
維護者通常 1 天內回覆
-
[Bug][API] Switching workflow versions leaves schedules online可能已有人在做 @zhuangchong 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
apache/dolphinscheduler#18731 ·
維護者通常 1 天內回覆