algorithm edit step ladder - andstudy/forge GitHub Wiki

Outbreak

๋ฌธ์ œ ์š”์•ฝ

  • ๋‹จ์–ด์— ํ•œ ๋ฌธ์ž๋ฅผ ์ถ”๊ฐ€, ์‚ญ์ œ, ๋ณ€๊ฒฝํ•œ ๋‹ค๋ฅธ ๋‹จ์–ด๊ฐ€ ์‚ฌ์ „์— ์žˆ๋Š” ๊ฒฝ์šฐ ๋‹จ๋ฐฉํ–ฅ ์—์ง€ ์ƒ์„ฑ
  • ๋‹จ๋ฐฉํ–ฅ ์—์ง€๋ฅผ ๋”ฐ๋ผ ์ตœ๋Œ€ ์ด๋™ ๊ฐ€๋Šฅํ•œ ๋‹จ์–ด์˜ ๊ฐœ์ˆ˜๋Š”?

๋ฌธ์ œ ํ•ด๊ฒฐ

  • ๋งต์„ ์ด์šฉํ•ด ๋‹จ์–ด Pool ์ƒ์„ฑ.
  • ํ•œ ๋ฌธ์ž๋ฅผ ์ถ”๊ฐ€, ์‚ญ์ œ, ๋ณ€๊ฒฝ ํ•˜๋Š” EditStep ์„ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ๋‹จ์–ด๊ฐ€ Pool ์— ์žˆ์œผ๋ฉด ์—์ง€ ์ƒ์„ฑ
  • EditStep ์ด ๊ฐ€๋Šฅํ•œ ๋‹จ์–ด๋“ค๋ผ๋ฆฌ ์—์ง€ ๊ด€๊ณ„ ํ…Œ์ด๋ธ” ์ƒ์„ฑ(๋ฉ”๋ชจ๋ฆฌ ์ ˆ์•ฝ์„ ์œ„ํ•ด ๋งต์‚ฌ์šฉ)
  • ๋‹จ์–ด ๊ด€๊ณ„ ํ…Œ์ด๋ธ”์— DFS!

๊ณ„ํš

  • ๋‚ด์ผ ์ด ์ฝ”๋“œ๋„ ์˜ˆ์˜๊ฒŒ ๋งŒ๋“ค์–ด ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~

ํ’€์ด

    using System;
    using System.Collections.Generic;
    using System.Text;
    using NUnit.Framework;
    
    namespace ACM_EditStepLadders
    {
        class Program
        {
            public static string[] input = 
            {
                "cat",
                "dig",
                "dog",
                "fig",
                "fin",
                "fine",
                "fog",
                "log",
                "wine"
            };
            
            static Dictionary<string, List<string>> rDic = new Dictionary<string, List<string>>();
            static int ๋‹ต = 0;
    
            static void Dfs(string src, int depth)
            {
                if (!rDic.ContainsKey(src))
                {
                    if (๋‹ต < depth)
                        ๋‹ต = depth;
    
                    return;
                }
    
                foreach (string s in rDic[src])
                {
                    Dfs(s, depth + 1);
                }
            }
    
    
            static void Main(string[] args)
            {
                // 1. > word pool ๋งŒ๋“ค๊ธฐ
                Dictionary<string, int> wDic = new Dictionary<string, int>();            
                List<string> wList = new List<string>();
                Dictionary<int, List<string>> lenDic = new Dictionary<int, List<string>>();
    
                for (int i = 0; i < input.GetLength(0); i++)
                {
                    wList.Add(input[i]);
                    wDic[input[i]] = i;
    
                    if (!lenDic.ContainsKey(input[i].Length))
                    {
                        lenDic[input[i].Length] = new List<string>();
                    }
    
                    lenDic[input[i].Length].Add(input[i]);
                }
    
                // 2.1 > ๋‹จ์–ด๊ฐ„ ๊ด€๊ณ„ ๋งŒ๋“ค๊ธฐ
                foreach (string src in wList)
                {
                    // ๊ณ ์นจ
                    for (int i = 0; i < src.Length; i++)
                    {
                        char[] tmp = src.ToCharArray();
    
                        char init = tmp[i];
                        init++;
    
                        for (char c = init; c <= 'z'; c++)
                        {
                            tmp[i] = c;
    
                            string key = new string(tmp);
                            if (string.Compare(key, src, StringComparison.Ordinal) > 1)
                            {
                                if (wDic.ContainsKey(key))
                                {
                                    if (!rDic.ContainsKey(src))
                                    {
                                        rDic[src] = new List<string>();
                                    }
    
                                    rDic[src].Add(key);
                                }
                            }
                        }
                    }
                }
    
                foreach (string src in wList)
                {
                    // ์ถ”๊ฐ€
                    for (int i = 0; i <= src.Length; i++)
                    {
                        char[] tmp = src.ToCharArray();
    
                        // ๋์— ํ•œ๊ฐœ ์–ด๋–ป๊ฒŒ ํ•˜๋А๋ƒ๊ฐ€ ๋ฌธ์ œ. 
                        // dog -> do ๊ฐ€ ๋˜๋Š” ์ผ€์ด์Šค ๋•Œ๋ฌธ์— ํ—ท๊ฐˆ.
                        char init = 'a';
    
                        if (i < src.Length)                   
                        {
                            init = tmp[i];
                            init++;
                        }
                       
                        for (char c = init; c <= 'z'; c++)
                        {
                            string key = src.Insert(i, new string(c,1));
    
                            if (string.Compare(key, src, StringComparison.Ordinal) > 1)
                            {
                                if (wDic.ContainsKey(key))
                                {
                                    if (!rDic.ContainsKey(src))
                                    {
                                        rDic[src] = new List<string>();
                                    }
    
                                    rDic[src].Add(key);
                                }
                            }
                        }                    
                    }                                        
                }
    
                foreach (string src in wList)
                {   
                    // ์‚ญ์ œ
                    for (int i = 0; i < src.Length; i++)
                    {
                        string key = src.Remove(i,1);
    
                        if (string.Compare(key, src, StringComparison.Ordinal) > 1)
                        {
                            if (wDic.ContainsKey(key))
                            {
                                if (!rDic.ContainsKey(src))
                                {
                                    rDic[src] = new List<string>();
                                }
    
                                rDic[src].Add(key);
                            }
                        }
                        
                    }
                                      
                }
    
                // 2.2 > ๋‹จ์–ด ๊ด€๊ณ„ ํ™•์ธ
                foreach (KeyValuePair<string, List<string>> p in rDic)
                {
                    Console.Write("{0} - ", p.Key);
    
                    foreach (string s in p.Value)
                    {
                        Console.Write("{0} ", s);
                    }
    
                    Console.WriteLine();
                }
                           
                // 3. > DFS
                foreach( string s in rDic.Keys )
                {
                    Dfs(s, 1);
                    break;
                }
                                               
                // 4. > ๋ฌธ์ œ ํ’€๊ธฐ
                Console.WriteLine("\n์ตœ๋Œ€ ํŽธ์ง‘ ์‚ฌ๋‹ค๋ฆฌ ๋‹จ์–ด ๊ฐœ์ˆ˜๋Š” {0} ์ž…๋‹ˆ๋‹ค.\n", ๋‹ต);
    
            }
        }
    
        [TestFixture]
        public class Unitest
        {
    
            [TestFixtureSetUp]
            public void SetUp()
            {
    
            }
    
    
            [TestFixtureTearDown]
            public void TearDown()
            {
    
    
            }
        }
    }

๋ฌธ์ œ ์งˆ๋ฌธ

  • ์˜ˆ์ œ์˜ ์ถœ๋ ฅ๊ฐ’์ด 5๊ฐ€ ๋งž๋‚˜์š”?

    • wine -> fine -> fin -> fig -> dig -> dog -> fog -> log
    • ์—ฌ๋Ÿ๊ฐœ๊ฐ€ ๋„˜๋Š” ๊ฒฝ์šฐ๋„ ๋‚˜์˜ค๋Š”๋ฐ ๋ฌธ์ œ๋ฅผ ์ž˜๋ชป ์ดํ•ดํ•œ๊ฐ€์š”? ^^;
    • edit step ladder ๋Š” lexicographically ordered sequence ๋ผ๊ณ  ๋˜์–ด ์žˆ๋„ค์š”.
      • ์•„ ๊ทธ๋ ‡๋„ค์š”~! ^^
  • ๊ทธ๋ฆฌ๊ณ  ์ด์ œ์„œ์•ผ ๋ฌธ์ œ๋ฅผ ์ดํ•ดํ•˜์ž๋ฉด ์–ด๋–กํ•˜์ž๋Š” ๊ฑด๊ฐ€์šค? ์ง€๊ธˆ ์ œ๊ฐ€ ์•ˆ ๊ฐ„๋‹ค๊ณ  ๊ตฐ๊ธฐ ๋น ์ง„ ๊ฑด๊ฐ€์šค? ๋ฒ„๋Ÿญ

    • ํ›„ํ›„ ๋ฒผ๋ฝ์น˜๊ธฐ ํ•˜๋Š”๊ฑฐ ์•„์‹œ๋ฉด์„œ.. ^^;
  • dog -> do ์ด๊ฒŒ ์‚ฌ์ „ ์‹œํ€€์Šค ์ˆœ์„œ์— ์•ˆ๋งž๋Š”๊ฑฐ ๊ฐ™์•„์š”;;

ParkPD

์•„์ด๋””์–ด.

  1. ์ด๋ฏธ ์ฐพ์•„๋ณธ ๋‹จ์–ด์— ๋Œ€ํ•ด์„œ๋Š” ๋” ์ด์ƒ ์ฐพ์„ ํ•„์š”๊ฐ€ ์—†๋‹ค.
  2. ์‚ฌ์ „์ˆœ์œผ๋กœ ์ฐพ์•„๋ณด๋ฉด ๋œ๋‹ค.
  3. ๊ฐ€์žฅ ๋†’์€ ๊ฐ’์„ ์œ ์ง€ํ•œ๋‹ค. (DP, ๋‹ค์ต์ŠคํŠธ๋ผ)
  • ๊ทธ๋Ÿฌ๋‚˜ ์šฐ๋ คํ–ˆ๋˜๋Œ€๋กœ Time limit exceeded ๊ฐ€ ๋‚˜๋Š”๊ตฐ์š”. ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ™• ๊ณ ์ณ์•ผ ํ• ์ง€, ๋ฌธ์ž์—ด ์ชฝ ๋ถ€๋ถ„์„ ์ตœ์ ํ™” ํ•ด์•ผ ํ•˜๋Š”์ง€ ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ฉ...

  • map ์ด๋‚˜ set, vector ๋Œ€์‹  array ๋กœ ๋ฐ”๊ฟ”๋„ ์•ˆ ๋˜๋„ค์š”. ํž... string ๋„ ๋ฐ”๊ฟ”์•ผ ํ• ๊นŒ๋‚˜...

      /* @JUDGE_ID:parkpd 110401 Cpp "test" */
      
      /* @BEGIN_OF_SOURCE_CODE */
      
      #include <iostream>
      #include <vector>
      #include <set>
      #include <string>
      #include <strstream>
      #include <algorithm>
      #include <map>
      #include <math.h>
      
      //#define _UNIT_TEST
      
      using namespace std;
      
      namespace ATUtil
      {
      
      	bool IsInRange(int value, int from, int to)
      	{
      		return (from <= value) && (value <= to);
      	}
      
      	int ConvertToIndex(char c)
      	{
      		if ('a' <= c && c <= 'z')
      		{
      			return c - 'a';
      		}
      		else
      		{
      			return -1;
      		}
      	}
      
      	char ConvertToChar(int i)
      	{
      		return (char)i + 'a';
      	}
      
      	typedef map<int, int> IntDB;
      	typedef vector<int> Ints;
      
      };
      
      using namespace ATUtil;
      
      #ifdef _UNIT_TEST
      
      #include "../UnitTest++/src/UnitTest++.h"
      
      int main()
      {
      	UnitTest::RunAllTests();
      
      	char temp;
      	cin >> temp;
      
      	return 0;
      }
      
      #endif
      
      // code implement
      
      namespace ATCode
      {
      	string g_Words[25000];
      	int g_Ladder[25000];
      
      	//////////////////////////////////////////////////////////////////////////
      	// CEditStepLadder
      	class CEditStepLadder
      	{
      	public:
      		CEditStepLadder() : m_Longest(0), m_WordSize(0) {}
      
      		int m_Longest;
      		int m_WordSize;
      
      		void Insert(const string& str);
      		void Find(size_t from, const string& word);
      		int GetLongestEditStepLadder();
      	};
      
      	void CEditStepLadder::Insert(const string& str)
      	{
      		g_Words[m_WordSize] = str;
      		g_Ladder[m_WordSize] = 1;
      		m_WordSize++;
      	}
      
      	void CEditStepLadder::Find(size_t from, const string& word)
      	{
      		int left = (int)from + 1;	// ๋‚˜๋ณด๋‹ค ์‚ฌ์ „์ˆœ์œผ๋กœ ๋†’์€ ๋‹จ์–ด๋ถ€ํ„ฐ ๊ฒ€์ƒ‰ ์‹œ์ž‘
      		int right = m_WordSize - 1;
      		int mid;
      
      		while (left <= right)
      		{
      			mid = (left + right) / 2;
      			int cmp = strcmp(g_Words[mid].c_str(), word.c_str());
      			if (0 == cmp)
      			{
      				// ladder step ์ด ๋” ๊ธด ๊ฒฝ์šฐ์—๋งŒ ์—…๋ฐ์ดํŠธํ•œ๋‹ค.
      				int& currentWordStep = g_Ladder[from];
      				int& foundWordStep = g_Ladder[mid];
      				if ((foundWordStep < currentWordStep + 1))
      				{
      					foundWordStep = currentWordStep + 1;
      					if (m_Longest < foundWordStep)
      					{
      						m_Longest = foundWordStep;
      					}
      				}
      				break;
      			}
      			else if (0 < cmp)
      			{
      				right = mid - 1;
      			}
      			else
      			{
      				left = mid + 1;
      			}
      		}
      	}
      
      
      	int CEditStepLadder::GetLongestEditStepLadder()
      	{
      		vector<char> letter;
      		letter.reserve(26);
      		for (char c = 'a'; c <= 'z'; ++c)
      		{
      			letter.push_back(c);
      		}
      		const int letterSize = (int)letter.size();
      
      		string originalWord;
      		string word;
      
      		for (int it = 0; it < m_WordSize; ++it)
      		{
      			originalWord = g_Words[it];
      			word = originalWord;
      			size_t wordSize = word.size();
      
      			// ํ•œ ๊ธ€์ž๊ฐ€ ๋ฐ”๋€ ๊ฒฝ์šฐ
      			for (size_t i = 0; i < wordSize; ++i)
      			{
      				word = originalWord;		// reset
      				for (int j = 0; j < letterSize; ++j)
      				{
      					word[i] = letter[j];
      					Find(it, word);
      				}
      			}
      
      			// ํ•œ ๊ธ€์ž๋ฅผ ๋”ํ•œ ๊ฒฝ์šฐ.
      			// 3 ์ž์งœ๋ฆฌ ๊ธ€์ž๋ผ๋ฉด, ๊ธ€์ž๊ฐ€ ์ถ”๊ฐ€๋  ์ˆ˜ ์žˆ๋Š” ๊ณณ์€ 4 ๊ตฐ๋ฐ๋‹ค.
      			for (size_t i = 0; i <= wordSize; ++i)
      			{
      				word = originalWord;		// reset
      				word.insert(word.begin() + i, ' ');
      
      				for (int j = 0; j < letterSize; ++j)
      				{
      					word[i] = letter[j];
      					Find(it, word);
      				}
      			}
      
      			// ํ•œ ๊ธ€์ž๋ฅผ ๋บ€ ๊ฒฝ์šฐ
      			for (size_t i = 0; i < wordSize; ++i)
      			{
      				word = originalWord;		// reset
      				word.erase(i, 1);
      				Find(it, word);
      			}
      		}
      
      		return m_Longest;
      	}
      
      	///////////////////////////////////////////////////////////////
      	// CConsole
      	class CConsole
      	{
      	public:
      		static void ConsoleTest(istream& input, ostream& output);
      	};
      
      	void CConsole::ConsoleTest(istream& input, ostream& output)
      	{
      		CEditStepLadder ladder;
      		string word;
      		while (input >> word)
      		{
      			ladder.Insert(word);
      		}
      
      		int ret = ladder.GetLongestEditStepLadder();
      		output << ret;
      	};
      
      }
      
      using namespace ATCode;
      
      #ifndef _UNIT_TEST
      
      int main()
      {
      	CConsole::ConsoleTest(cin, cout);
      
      	return 0;
      }
      
      #else
      
      // tests
      
      struct FixtureConsole
      {
      	stringstream input;
      	stringstream output;
      };
      
      
      TEST_FIXTURE(FixtureConsole, ConsoleTest)
      {
      	string s = "test";
      	string s1 = "test1";
      	CHECK(s < s1);
      
      	string s2 = "aest";
      	string s3 = "test";
      	CHECK(s2 < s3);
      }
      
      TEST_FIXTURE(FixtureConsole, ConsoleTest1)
      {
      	input << 
      		"cat\n"
      		"dig\n"
      		"dog\n"
      		"fig\n"
      		"fin\n"
      		"fine\n"
      		"fog\n"
      		"log\n"
      		"wine\n"
      		;
      	CConsole::ConsoleTest(input, output);
      	CHECK_EQUAL("5", output.str());
      }
      
      #endif
      
      /* @END_OF_SOURCE_CODE */
    

CynicJJ

  • ๋งŽ์ด ๋Šฆ์—ˆ์Šต๋‹ˆ๋‹ค. ใ…‹

!StepLadder.vb

    Public Class StepLadder
    
    	Function GetEditStepLadders(ByVal inputs As List(Of String)) As Integer
    		Dim words As List(Of Word) = CreateWordList(inputs)
    		CalcWordSteps(words)
    		Return GetMaxSteps(words)
    	End Function
    
    	Sub CalcWordSteps(ByVal words As List(Of Word))
    		Dim maxSubStep As Integer
    
    		For i As Integer = 1 To words.Count - 1
    			Dim aWord As Word = words(i)
    
    			For j As Integer = 0 To i - 1
    				Dim compared As Word = words(j)
    
    				If IsEditStep(aWord, compared) Then
    					If compared.Steps > maxSubStep Then maxSubStep = compared.Steps
    				End If
    			Next j
    
    			aWord.SetSteps(aWord.Steps + maxSubStep)
    		Next i
    	End Sub
    
    	Function IsEditStep(ByVal first As Word, ByVal second As Word) As Boolean
    		Dim str1 As String
    		Dim str2 As String
    
    		If first.Str < second.Str Then
    			str1 = first.Str
    			str2 = second.Str
    		Else
    			str1 = second.Str
    			str2 = first.Str
    		End If
    
    		Dim isOneModified As Boolean = IsModifiedOne(str1, str2)
    		Dim isOneRemoved As Boolean = IsRemovedOne(str1, str2)
    		Dim isOneAdded As Boolean = IsAddeddOne(str1, str2)
    
    		Return (isOneModified Or isOneRemoved Or isOneAdded)
    	End Function
    
    	Function IsRemovedOne(ByVal first As String, ByVal second As String) As Boolean
    		Dim ch1() As Char = first.ToCharArray()
    		Dim ch2() As Char = second.ToCharArray()
    
    		If ch1.Length <> ch2.Length + 1 Then Return False
    
    		For Each c2 As Char In ch2
    			If Not IsContain(c2, ch1) Then Return False
    		Next
    
    		Return True
    	End Function
    
    	Function IsContain(ByVal aChar As Char, ByVal chs() As Char) As Boolean
    		For Each ch As Char In chs
    			If aChar = ch Then Return True
    		Next
    		Return False
    	End Function
    
    	Function IsModifiedOne(ByVal first As String, ByVal second As String) As Boolean
    		Dim ch1() As Char = first.ToCharArray()
    		Dim ch2() As Char = second.ToCharArray()
    
    		If ch1.Length <> ch2.Length Then Return False
    
    		Dim diffCount As Integer
    		For i As Integer = 0 To ch1.Length - 1
    			If ch1(i) <> ch2(i) Then diffCount += 1
    			If diffCount >= 2 Then Return False
    		Next
    
    		Return (diffCount = 1)
    	End Function
    
    	Function IsAddeddOne(ByVal first As String, ByVal second As String) As Boolean
    		Return IsRemovedOne(second, first)
    	End Function
    
    	Function CreateWordList(ByVal inputs As List(Of String)) As List(Of Word)
    		inputs.Sort()
    
    		Dim words As List(Of Word) = New List(Of Word)
    		For Each str As String In inputs
    			words.Add(New Word(str))
    		Next
    
    		Return words
    	End Function
    
    	Function GetMaxSteps(ByVal words As List(Of Word)) As Integer
    		Dim maxSteps As Integer
    
    		For Each aWord As Word In words
    			If aWord.Steps > maxSteps Then maxSteps = aWord.Steps
    		Next
    
    		Return maxSteps
    	End Function
    End Class

Word.vb

    Public Class Word
    
    	Private _str As String
    	ReadOnly Property Str()
    		Get
    			Return _str
    		End Get
    	End Property
    
    	Private _steps As Integer = 1
    	ReadOnly Property Steps()
    		Get
    			Return _steps
    		End Get
    	End Property
    
    	Sub SetSteps(ByVal steps As Integer)
    		_steps = steps
    	End Sub
    
    	Sub New(ByVal str As String)
    		_str = str
    	End Sub
    End Class

!StepLadderTest.vb

    <TestClass()> _
    Public Class StepLadderTest
    
    	Private _inputs As List(Of String)
    	Private _ladder As StepLadder = New StepLadder
    	Private _words As List(Of Word)
    
    	<TestInitialize()> _
    	Public Sub MyTestInitialize()
    		Dim strs() As String = {"cat", "dig", "dog", "fig", "fin", "fine", "fog", "log", "wine"}
    		_inputs = New List(Of String)(strs)
    		_words = _ladder.CreateWordList(_inputs)
    	End Sub
    
    	<TestMethod()> _
    	Public Sub SortTest()
    		_inputs.Sort()
    		Assert.AreEqual("cat", _inputs(0))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub CreateWordListTest()
    		Assert.AreEqual(9, _words.Count)
    		Assert.AreEqual("cat", _words(0).Str)
    	End Sub
    
    	<TestMethod()> _
    	Public Sub IsContainTest()
    		Dim chs() As Char = {"a"c, "b"c}
    		Assert.IsTrue(_ladder.IsContain("a"c, chs))
    		Assert.IsFalse(_ladder.IsContain("c"c, chs))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub IsRemovedOneTest()
    		Assert.IsTrue(_ladder.IsRemovedOne("fine", "fne"))
    		Assert.IsFalse(_ladder.IsRemovedOne("fin", "fine"))
    		Assert.IsFalse(_ladder.IsRemovedOne("fine", "fe"))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub IsAddedOneTest()
    		Assert.IsTrue(_ladder.IsAddeddOne("fin", "fine"))
    		Assert.IsFalse(_ladder.IsAddeddOne("fine", "fie"))
    		Assert.IsFalse(_ladder.IsAddeddOne("fi", "fine"))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub IsModifiedOneTest()
    		Assert.IsTrue(_ladder.IsModifiedOne("fig", "dig"))
    		Assert.IsTrue(_ladder.IsModifiedOne("fog", "dog"))
    		Assert.IsFalse(_ladder.IsModifiedOne("fog", "fo"))
    		Assert.IsFalse(_ladder.IsModifiedOne("fog", "foge"))
    		Assert.IsFalse(_ladder.IsModifiedOne("fog", "dig"))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub IsEditStepTest()
    		Dim word1 As Word = New Word("fine")
    		Dim word2 As Word = New Word("fin")
    		Assert.IsTrue(_ladder.IsEditStep(word1, word2))
    		Assert.IsTrue(_ladder.IsEditStep(word2, word1))
    		Assert.IsFalse(_ladder.IsEditStep(word1, word1))
    	End Sub
    
    	<TestMethod()> _
    	Public Sub CalcWordStepsTest()
    		_ladder.CalcWordSteps(_words)
    
    		Assert.AreEqual("dog", _words(2).Str)
    		Assert.AreEqual(2, _words(2).Steps)
    
    		Assert.AreEqual("log", _words(7).Str)
    		Assert.AreEqual(5, _words(7).Steps)
    	End Sub
    
    	<TestMethod()> _
    	Public Sub GetEditStepLaddersTest()
    		Assert.AreEqual(5, _ladder.GetEditStepLadders(_inputs))
    	End Sub
    End Class
โš ๏ธ **GitHub.com Fallback** โš ๏ธ