> I need to write a function that when given a list of tiles that the user has, and a word that they wish to enter, will determine has the tiles to make the word
OK, you don't need a 2D grid for a scrabble board for that, just a couple of strings.
Code:
#include <stdio.h>
int canMakeWord ( char *hasLetters, char *needWord ) {
int result = 0;
// do something here
return result;
}
int main ( ) {
printf( "Result=%d\n", canMakeWord("qwerty", "try" ); /* should print 1 */
printf( "Result=%d\n", canMakeWord("qwerty", "hello" ); /* should print 0 */
return 0;
}
Have a go at writing something there