-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboggle.h
More file actions
16 lines (14 loc) · 736 Bytes
/
boggle.h
File metadata and controls
16 lines (14 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef BOGGLE_H
#define BOGGLE_H
#ifndef RECCHECK
#include <vector>
#include <set>
#include <utility>
#include <string>
#endif
std::vector<std::vector<char> > genBoard(unsigned int n, int seed);
void printBoard(const std::vector<std::vector<char> >& board);
std::pair<std::set<std::string>, std::set<std::string> > parseDict(std::string fname);
std::set<std::string> boggle(const std::set<std::string>& dict, const std::set<std::string>& prefix, const std::vector<std::vector<char> >& board);
bool boggleHelper(const std::set<std::string>& dict, const std::set<std::string>& prefix, const std::vector<std::vector<char> >& board, std::string word, std::set<std::string>& result, unsigned int r, unsigned int c, int dr, int dc);
#endif