Skip to content

feat: Add Burrows-Wheeler Transform (BWT) implementation in R#184

Merged
siriak merged 1 commit intoTheAlgorithms:masterfrom
sgindeed:burrows-wheeler-feature
Oct 11, 2025
Merged

feat: Add Burrows-Wheeler Transform (BWT) implementation in R#184
siriak merged 1 commit intoTheAlgorithms:masterfrom
sgindeed:burrows-wheeler-feature

Conversation

@sgindeed
Copy link
Contributor

@sgindeed sgindeed commented Oct 9, 2025

  • Implements Burrows-Wheeler Transform (BWT) for a given string in R.
  • Appends a unique end-of-string marker $ to ensure proper rotations.
  • Generates all cyclic rotations of the input string.
  • Sorts the rotations lexicographically to prepare for BWT.
  • Constructs the BWT by taking the last character of each sorted rotation.
  • Includes interactive input, allowing users to enter any string.
  • Returns a list containing original string, sorted rotations, and the final BWT for easy inspection.

Co-authored-by: Arpita23r <arpita2302r@gmail.com>
@sgindeed sgindeed requested review from acylam and siriak as code owners October 9, 2025 16:32
@sgindeed
Copy link
Contributor Author

@siriak please review and let me know if any modifications are needed

@siriak siriak requested a review from Copilot October 11, 2025 08:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a complete implementation of the Burrows-Wheeler Transform (BWT) algorithm in R for string manipulation and compression applications. The implementation generates cyclic rotations of an input string, sorts them lexicographically, and constructs the BWT by extracting the last character of each sorted rotation.

  • Implements core BWT algorithm with proper end-of-string marker handling
  • Provides interactive user input functionality for testing
  • Returns comprehensive results including original string, sorted rotations, and final BWT

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit e92a3f2 into TheAlgorithms:master Oct 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants