p2227
V2EX  ›  算法

关于字符串的算法题,题目很简单,但我想看看网上有没有更好的解法时,不知道用什么关键字去搜索

  •  
  •   p2227 · May 3, 2018 · 2885 views
  •   You need to sign in to view this topic
    This topic created in 3077 days ago, the information mentioned may be changed or developed.
    有两个字符串,s1,s2,长度和构成的字符都一样,但顺序不一样,求最少的交换把 s1 变成 s2

    我搜索了一下 Damerau-Levenshtein 距离 只交换相邻的,现在不限于相邻。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2492 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 02:18 · PVG 10:18 · LAX 19:18 · JFK 22:18
    ♥ Do have faith in what you're doing.