You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
Answer / Rashmi Yadav
The minimum number of steps can be found by using a dynamic programming approach such as Floyd-Warshall algorithm or Dijkstra's shortest path algorithm, which both have time complexity O(n^3). In C language, you can implement this using the edit distance algorithm.
| Is This Answer Correct ? | 0 Yes | 0 No |
how many types of operating system are avaliable?
WHAT IS NV RAM ?
what is integration testing in real time applications?
Which tag is used to create table row
which worker is involved in all the phases of SDLC?
how do you generate source code for the automatic generation for receipt number
how many keywords are present in "c"?
18 Answers Assurgent, Cynosure Software, IBM,
Binary tree?
I'm new to ABAP. What is Module pool in SAP?
What is the use of Differ interface check box in Ship confirm?
SAS question: I have 50 fils a1,a2,...,a50. the primary key is upc. then if i want to merge all 50 files, the code is as follows, data test; merge a1 ... a50; by upc; run; we know that writing all 50 files name is time consuming, is there any standard format of this code?
HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??