We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7635b1 commit 0ce29ecCopy full SHA for 0ce29ec
Strings/one_edit.go
@@ -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
+*/
13
func OneEdit(stringOne string, stringTwo string) bool {
14
lengthOne := len(stringOne)
15
lengthTwo := len(stringTwo)
0 commit comments