private void FindCharAndSwapColumns(int sortedCharIndex) { for (int unsortedCharIndex = 0; unsortedCharIndex < GetKeywordLength(); unsortedCharIndex++) { unsortedChar = unsortedKeyword.CharAt(unsortedCharIndex); if (IsSwapable(sortedCharIndex, unsortedCharIndex)) { Swap(sortedCharIndex, unsortedCharIndex); break; } } }
private void RearrangeTable() { sortedKeywordIndexes = new List <int>(); for (int sortedCharIndex = 0; sortedCharIndex < GetKeywordLength(); sortedCharIndex++) { sortedChar = sortedKeyword.CharAt(sortedCharIndex); FindCharAndSwapColumns(sortedCharIndex); } }