mirror of
https://github.com/cubixle/codekata-golang.git
synced 2026-04-30 16:28:45 +01:00
20201229
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
|
||||
}
|
||||
|
||||
func isEqual(s, t string) bool {
|
||||
return process(s) == process(t)
|
||||
}
|
||||
|
||||
func process(s string) string {
|
||||
var ret []rune
|
||||
for _, c := range s {
|
||||
if string(c) == "#" {
|
||||
if len(ret) > 0 {
|
||||
ret = ret[:len(ret)-1]
|
||||
}
|
||||
continue
|
||||
}
|
||||
ret = append(ret, c)
|
||||
}
|
||||
return string(ret)
|
||||
}
|
||||
|
||||
func process2(s string) string {
|
||||
return ""
|
||||
}
|
||||
Reference in New Issue
Block a user