src/anagramsolver/containers/WordlistContainer.cs
/// <summary>
/// Pseudo:
/// Loop through rows
///   Loop through number of letters in each row
///     If there are more letters than in anagram, then bail out
///   If not bailed out, then word is subset, so update col2
/// </summary>
/// <param name="anagramCtrl"></param>
/// <returns></returns>
Loop through rows
Loop through number of letters in each row
If there are more letters than in anagram, then bail out
If not bailed out, then word is subset, so update col2
Loop through rows Loop through number of letters in each row If there are more letters than in anagram then bail out If not bailed out then word is subset so update col2
public int UpdateCol2InTableFilter2(IAnagramContainer anagramCtrl)
        {
            var noOfWordsBeingSubset = 0;
            var isSubset = true;
            foreach (var row in _tableFilter2_WordMatrix)
            {
                isSubset = anagramCtrl.IsSubset(row);
                if (isSubset)
                {
                    row[2] = 1;
                    noOfWordsBeingSubset++;
                }
            }
            return noOfWordsBeingSubset;
        }
public int UpdateCol2InTableFilter2 ( IAnagramContainer anagramCtrl ) { var noOfWordsBeingSubset = 0 ; var isSubset = true ; foreach ( var row in _tableFilter2_WordMatrix ) { isSubset = anagramCtrl . IsSubset ( row ) ; if ( isSubset ) { row [ 2 ] = 1 ; noOfWordsBeingSubset ++ ; } } return noOfWordsBeingSubset ; }
Pseudo:
Loop through rows
Loop through number of letters in each row
If there are more letters than in anagram, then bail out
If not bailed out, then word is subset, so update col2
Pseudo : Loop through rows Loop through number of letters in each row If there are more letters than in anagram then bail out If not bailed out then word is subset so update col2
// No number of letters must be larger than in the anagram row // Count number of words being subset // Update col2
None
anagramCtrl
IAnagramContainer
None