A fast, browser-based crossword puzzle word finder that helps you discover words matching a specific pattern.
- Instant Results: See matching words as you type with no delay
- Multiple Themes: Choose from 6 different visual themes including Google Material Design, Apple Human Interface, and Microsoft Fluent Design
- Responsive Design: Works seamlessly on desktop and mobile devices
- Accessibility Support: Screen reader compatible with keyboard navigation
- PWA Support: Can be installed as a Progressive Web App for offline use
- Access the application through a web browser (open
index.html
or serve via a local web server) - Select your preferred visual theme from the dropdown
- Adjust the word size slider to set your desired word length (between 2-15 letters)
- Type letters in the boxes where you know them, leave unknown positions blank
- Matching words will appear instantly as you type
- Click on any matching word to fill it into the boxes
- Use the "Clear All" button to reset your input
The application offers six professionally designed themes:
- Newspaper: Classic, elegant styling inspired by print crosswords
- Modern: Clean, contemporary design with minimal styling
- Google: Implementation of Google's Material Design guidelines
- Apple: Implementation of Apple's Human Interface Guidelines
- Microsoft: Implementation of Microsoft's Fluent Design System
- Silly: A playful design with random rotations for a fun experience
The Crossword Solver is built with accessibility in mind:
- Full keyboard navigation support
- Screen reader compatibility with ARIA attributes
- High contrast options
- Focus indicators for keyboard users
- Skip-to-content link for keyboard navigation
This application uses a highly optimized bit-manipulation algorithm to provide instant search results as you type. Originally written in C# and converted to JavaScript, the solver preprocesses the dictionary to enable extremely fast pattern matching.
The crossword solver uses a sophisticated bit-masking technique that revolutionizes how pattern matching is performed:
-
Dictionary Preprocessing:
- Words are first grouped by their length
- For each word length and each possible (position, letter) combination, a bit mask is created
- Each bit in the mask corresponds to a specific word in the dictionary
- If a word has a particular letter at a specific position, its corresponding bit is set to 1
-
BigInt Implementation:
- The solver leverages JavaScript's BigInt to handle 64-bit integer operations efficiently
- Words are grouped into blocks of 64, with each block represented by a single 64-bit integer
- This approach drastically reduces memory usage and computation time
-
Query Processing:
- For a given pattern (e.g., "a..le" for "apple"), the algorithm:
- Starts with all bits set to 1 (representing all words as candidates)
- For each known letter position, performs a bitwise AND with its corresponding mask
- After processing all known positions, the remaining 1 bits represent matching words
- Uses fast bit manipulation (trailing zero count) to identify matching words
- For a given pattern (e.g., "a..le" for "apple"), the algorithm:
-
Performance Characteristics:
- Time Complexity: O(k) where k is the number of known letters in the pattern
- Space Complexity: O(n × a × p) where n is dictionary size, a is alphabet size, p is max word length
- Pattern matching is constant time regardless of dictionary size
The application consists of three main components:
- User Interface Layer:
- HTML/CSS for rendering the interface
- Multiple theme options using separate CSS files
- JavaScript event handlers for real-time interaction
- Responsive design that works on various screen sizes
- Accessibility features for inclusive user experience
- Pattern Matcher:
- Converts UI input to the appropriate query pattern
- Handles special cases and input validation
- Manages the communication between UI and solver
- Fast Solver Engine:
- The core FastCrosswordSolver class that implements the bit-manipulation algorithm
- In-memory processing for constant-time pattern matching
- Optimized for performance with BigInt operations
The application first loads and preprocesses the dictionary, then provides an interactive interface for users to find words matching their specified patterns.
The Crossword Solver is implemented as a Progressive Web App (PWA), which means:
- It can be installed on your device's home screen
- It works offline once the dictionary has been cached
- It provides a native app-like experience
The application is compatible with:
- Chrome/Edge (latest versions)
- Firefox (latest versions)
- Safari (latest versions)
- Mobile browsers (iOS Safari, Android Chrome)
This project is licensed under the MIT License - see the LICENSE.md file for details.