• 2022-06-18
    下面给出了最长公共子序列问题中输出最长公共子序列的函数Print-LCS([img=74x23]1803dee92de4aa2.png[/img])伪代码,其中空白处应分别填入____输入:追踪数组[img=30x19]1803dee9365dfdb.png[/img],序列[img=15x19]1803dee93e380fd.png[/img],当前位置[img=7x18]1803dee945ba22c.png[/img]和[img=8x22]1803dee94e71e8b.png[/img] 输出:[img=104x25]1803dee956ba607.png[/img]的最长公共子序列if then return [img=52x19]1803dee95e6d615.png[/img]endif [img=116x26]1803dee9670d417.png[/img] then Print-LCS([img=30x19]1803dee97068138.png[/img],[img=15x19]1803dee978e55b2.png[/img], , ) print [img=15x17]1803dee98172499.png[/img]else if [img=73x25]1803dee989d4159.png[/img] then Print-LCS([img=30x19]1803dee97068138.png[/img],[img=15x19]1803dee978e55b2.png[/img],[img=30x20]1803dee9a2100d9.png[/img],[img=8x22]1803dee9ae9ca95.png[/img])endelse Print-LCS([img=30x19]1803dee97068138.png[/img],[img=15x19]1803dee978e55b2.png[/img],[img=7x18]1803dee9c855314.png[/img],[img=39x22]1803dee9d0d9610.png[/img])end
    A: [img=235x26]1803dee9d8e4640.png[/img]
    B: [img=240x26]1803dee9e157294.png[/img]
    C: [img=178x26]1803dee9e9d12e3.png[/img]
    D: [img=189x26]1803dee9f2766a1.png[/img]
  • 举一反三