Example #1
0
int main()
{
	Solution s;
	{
		cout << s.minDistance("a", "a") << endl;
		cout << s.minDistance("a", "b") << endl;
		cout << s.minDistance("dinitrophenylhydrazine", "acetylphenylhydrazine") << endl;
	}

	std::cin.get();
	return 0;
}
Example #2
0
int main()
{
    cout << "Hello world!" << endl;
    Solution s;
    cout<<s.minDistance("eeba","abca");
    return 0;
}
int main() {
    Solution sol;

    cout << sol.minDistance("abcde", "abc") << endl;

    return 0;
}
Example #4
0
int main() {
    Solution sol = Solution();
    string first, second;
    cin >> first >> second;
    cout << sol.minDistance(first, second) << endl;
    return 0;
}
int main()
{
        Solution s;
        auto r = s.minDistance("dbcc", "bbba");
        cout << r << endl;
        return 0;
}
Example #6
0
int main(){
	string word1,word2;
	Solution so;
	while(getline(cin,word1)){
		getline(cin,word2);
		cout<<so.minDistance(word1,word2)<<endl;
	}
}
Example #7
0
int main()
{
	string s1("a");
	string s2("b");
	Solution s;
	cout<<s.minDistance(s1, s2)<<endl;
	return 0;
}
Example #8
0
int _tmain(int argc, _TCHAR* argv[])
{
	string s1 = "sea";
	string s2 = "eta";
	Solution so;
	int mini = so.minDistance(s1, s2);
	return 0;
}
int main(){
	Solution sol;
	string w1 = "hello";
	string w2 = "hallowbeyourname";
	int out = sol.minDistance(w1,w2);
	cout << out << endl;
	return 1;
}
Example #10
0
int main()
{
    Solution s;
    string word1 = "a";
    string word2 = "d";

    cout << s.minDistance(word1, word2) << endl;
    return 0;
}
Example #11
0
int main(int argc, char const *argv[])
{
	Solution s;
	string word1 = "intention";
	string word2 = "execution";
	int result = s.minDistance(word1,word2);
	printf("%d\n", result );
	return 0;
}
Example #12
0
int main(void)
{
        string a("park");
        string b("spake");
        Solution s;
        int x = s.minDistance(a, b);
        printf("--%d--\n", x);
        return 0;
}
Example #13
0
int main(int argc, char **argv) {
  std::cout << "------" << argv[0] << "------" << std::endl;

  string s = "abaabcbcd";
  string t = "abc";
  std::cout << "Input:\n";
  Output(s);
  Output(t);

  Solution sol;

  std::cout << "Output:\n";
  Output(sol.minDistance(s, t));

  return 0;
}
int main ( int argc, char *argv[] ) {
    /*{
    FILE* file = fopen(argv[1], "r");
    int a, b;
    while(fscanf(file, "%d,%d", &a, &b) != EOF){
    }*/
    /*
    getI(T);
    int T;
    FE(cases,1,T){
        printf("Cases #%d: ", cases);
    }
    }*/
    Solution s = Solution();
    cout << s.minDistance(string("a"), string("ab")) << endl;
    return EXIT_SUCCESS;
}
Example #15
0
int main()
{
	string word1;
	string word2;

	cout << "Please input the first string: ";
	cin >> word1;
	cout << "Please input the second string: ";
	cin >> word2;

	Solution s;

	int result = s.minDistance(word1, word2);

	cout << "The minimum number of steps required to convert word1 to word2 is: " << result << endl;

	system("pause");
	return 0;
}
Example #16
0
int main(int argc, char* argv[]) {
  Solution s;
  int distance = s.minDistance("sea", "ate");
  cout << distance << endl;
  return 0;
}
Example #17
0
int main(){
	Solution c;
	cout << c.minDistance("b","a");
	return 0;
}
Example #18
0
void main()
{
	Solution solution;
	cout << (solution.minDistance("abcde", "bcfe") == 2) << endl;
	cout << (solution.minDistance("zoologicoarchaeologist", "zoogeologist") == 10) << endl;
}
Example #19
0
void test(){
    string word1 = "a";
    string word2 = "bcdfdfa";
    Solution sol;
    cout<<sol.minDistance(word1,word2);
}
Example #20
0
int main(){
    Solution s;
    cout<<s.minDistance("abc", "acbc");
}
Example #21
0
int main()
{
    Solution s;
    cout<<s.minDistance("sea", "eat")<<endl;
}
Example #22
0
int main()
{
    Solution s;
    cout << s.minDistance("sitting", "kitten");
}
Example #23
0
int main() {
Solution s;
cout<<s.minDistance("abc","def")<<endl;
return 0;
}
Example #24
0
int main(int argc, const char * argv[]) {
    // insert code here...
    Solution so;
    cout<<so.minDistance("eeba", "abca")<<endl;
    return 0;
}
Example #25
0
// Test Driver 
int main() {
    Solution sln; 
    cout << sln.minDistance("sea", "eat") << endl; 
    return 0; 
}
Example #26
0
int main()
{
    Solution s;
    s.minDistance("horse", "ros");
}
Example #27
0
int main() {
    Solution newSolution;
    cout << newSolution.minDistance("abcde","abc") << endl;
    return 0;
}