Re: [問題] Google Interview Question (1)

作者: eight0 (欸XD)   2013-05-14 00:06:45
※ 引述《RockLee (Now of all times)》之銘言:
原始網址:
http://www.careercup.com/question?id=14539805
題目:
Three strings say A, B, C are given to you.
Check weather 3rd string is interleaved from string A and B.
Ex: A="abcd" B="xyz" C="axybczd". answer is yes. o(n)
作者: suhorng ( )   2013-05-14 00:09:00
欸特推一個
作者: atoi (atoi)   2013-05-14 00:24:00
第2點有沒有可能是 aa?? aa?? aa??aa??阿
作者: jhchou (jhchou)   2013-05-14 00:24:00
我用你上一篇的連結測aaax aaay aaaayaax 結果是false
作者: eight0 (欸XD)   2013-05-14 00:28:00
! 樓上是對的 第2點的處理方法不正確
作者: Leon (Achilles)   2013-05-14 01:55:00
你只有用 2-step Dynamic programming, string 一長會失敗
作者: eight0 (欸XD)   2013-05-14 13:39:00
http://jsfiddle.net/h73Fr/8/ 這樣是能跑了 但有點不確定晚上再來討論2.的狀況

Links booklink

Contact Us: admin [ a t ] ucptt.com