-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwordle.h
29 lines (25 loc) · 991 Bytes
/
wordle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef WORDLE_H
#define WORDLE_H
#include <set>
#include <string>
/**
* @brief Returns the list of all legal words in the provided dictionary
* that meet the criteria provided in the `in` and `floating`
* inputs.
*
* @param [in] in - string of fixed, correct characters and `-`s to indicate
* the length of string and locations that must be filled in
* @param [in] floating - Characters that must be used somewhere in the word
* @param [in] dict - Dictionary of strings of legal words
* @return std::set<std::string> - Set of all words that meet the criteria
*/
std::set<std::string> wordle(
const std::string& in,
const std::string& floating,
const std::set<std::string>& dict);
// std::set<std::string> wordle_helper(
// const std::string& in,
// const std::string& floating,
// //possible letters that know exist in word, can have duplicates
// const std::set<std::string>& dict, unsigned int index);
#endif