Skip to content

Commit 0ce29ec

Browse files
committed
add question
1 parent c7635b1 commit 0ce29ec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Strings/one_edit.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
You're given two strings stringone and stringtwo. Write a function that determines if these
3+
two strings can be made equal using only one edit.
4+
5+
6+
There are 3 possible edits:
7+
Replace: One character in one string is swapped for a different character.
8+
Add:: One character is added at any index in one string.
9+
Remove: One character is removed at any index in one string.
10+
11+
12+
*/
113
func OneEdit(stringOne string, stringTwo string) bool {
214
lengthOne := len(stringOne)
315
lengthTwo := len(stringTwo)

0 commit comments

Comments
 (0)