Skip to content

[pull] master from TheAlgorithms:master#230

Merged
pull[bot] merged 1 commit intoplayer1forstudent:masterfrom
TheAlgorithms:master
Apr 5, 2026
Merged

[pull] master from TheAlgorithms:master#230
pull[bot] merged 1 commit intoplayer1forstudent:masterfrom
TheAlgorithms:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Apr 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* feat(strings): add MoveHashToEnd algorithm with tests

- Add MoveHashToEnd utility class that moves all '#' characters
  to the end of a string while preserving the order of other characters
- Algorithm runs in O(n) time and O(n) space using a two-pass approach:
  first collects non-'#' chars, then fills remaining positions with '#'
- Add null and empty string guards
- Add MoveHashToEndTest with 9 unit tests covering normal, edge,
  and boundary cases (null, empty, all-hash, no-hash, single char)

* docs(strings): add reference URL to MoveHashToEnd Javadoc

* docs: add MoveHashToEnd to DIRECTORY index

* style(strings): add missing newline at EOF in MoveHashToEnd

* test(strings): fix MoveHashToEnd expected output for sample input
@pull pull bot locked and limited conversation to collaborators Apr 5, 2026
@pull pull bot added the ⤵️ pull label Apr 5, 2026
@pull pull bot merged commit 13aaad2 into player1forstudent:master Apr 5, 2026
5 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant