You are browsing as a guest. Sign up (or log in) to start making projects!

Rumble

  • 3 Devlogs
  • 5 Total hours

Rust command line tool for solving Jumble word puzzles.

Ship #1

Rumble is a Rust CLI tool to solve Jumbles and anagrams. It is very fast (as one can expect from Rust) and easy to use. I am relatively new to Rust, and so this was a nice opportunity to finally create a full command-line project from start to finish and publish it on crates.io. Installation instructions are in the repo README. Please consider writing an issue if you find any bugs!

  • 3 devlogs
  • 5h
Try project → See source code →
Open comments for this post

48m 52s logged

Serious refactor - DFS + pruning was actually not an efficient solution to the problem; simple character counting using HashMaps much faster.

Serious refactor - DFS + pruning was actually not an efficient solution to the problem; simple character counting using HashMaps much faster.

Replying to @bad-indentation

0
9
Open comments for this post

3h 7m 23s logged

Finished first iteration of solver; working on optimizations.

Successfully implemented depth-first search to generate all possible anagrams of the scrambled input. Used a pre-computed HashSet of valid prefixes to quickly prune any branches that wouldn’t lead to valid English words.

Implemented CLI interface using Clap. Added –verbose flag for logging and –include-partial for words that do not use all available letters.

Initial optimizations include removing words that could never be made using the available letters- that is, words that are too long or contain invalid letters.

Further optimizations include using concurrency when reading the file and using smart pointers to avoid excessive cloning. Also considering the possibility of iterating over candidate WORDS and determining whether they are a valid solutions instead of using combinatorics.

Finished first iteration of solver; working on optimizations.

Successfully implemented depth-first search to generate all possible anagrams of the scrambled input. Used a pre-computed HashSet of valid prefixes to quickly prune any branches that wouldn’t lead to valid English words.

Implemented CLI interface using Clap. Added –verbose flag for logging and –include-partial for words that do not use all available letters.

Initial optimizations include removing words that could never be made using the available letters- that is, words that are too long or contain invalid letters.

Further optimizations include using concurrency when reading the file and using smart pointers to avoid excessive cloning. Also considering the possibility of iterating over candidate WORDS and determining whether they are a valid solutions instead of using combinatorics.

Replying to @bad-indentation

0
2

Followers

Loading…