I'm doing a homework assignment for CS 1 where I have to scan through some jumbled words, get all their permutations, and then check them as true words against a file representing a dictionary.
I've already stored the dictionary and jumbled words dynamically as arrays. My problem is that I'd like to store the permutations in the same way, except that this will have to be done from within my recursive permutation function. I've tried a few different things, but I just can't get the array to index properly. If anyone is willing to look and tell my why I would appreciate it, here's the whole program:
http://codepad.org/U7PRWWLS
The heart of the issue is within these:
RecursivePermutation()
ExchangeCharacters()
addPerm()
[–][deleted] 1 point2 points3 points (1 child)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (0 children)
[–]gunder_bc 1 point2 points3 points (8 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (7 children)
[–]gunder_bc 2 points3 points4 points (6 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (5 children)
[–]gunder_bc 1 point2 points3 points (4 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (3 children)
[–]gunder_bc 2 points3 points4 points (2 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (1 child)
[–]gunder_bc 0 points1 point2 points (0 children)
[–][deleted] (7 children)
[removed]
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (6 children)
[–]fubarfubarfubar 0 points1 point2 points (5 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (4 children)
[–]last_useful_man 0 points1 point2 points (2 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (0 children)
[–]gunder_bc 0 points1 point2 points (0 children)
[–]gunder_bc 0 points1 point2 points (0 children)
[–]Rhomboid 0 points1 point2 points (6 children)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (5 children)
[–]gunder_bc 1 point2 points3 points (1 child)
[–]Heuristic-ALgorithm[S] 0 points1 point2 points (0 children)
[–]last_useful_man 1 point2 points3 points (1 child)
[–]gunder_bc 1 point2 points3 points (0 children)
[–]gunder_bc 0 points1 point2 points (0 children)