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