討論串[問題] Google Interview Question (1)
共 16 篇文章

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者Leon (Achilles)時間12年前 (2013/05/14 15:52), 編輯資訊
0
0
1
內容預覽:
首先感謝你的貢獻.. 不過這個 Code 似乎有問題,. 我用了一個試了一下. test("aaaaa", "aaaabbbb", "aaaaabbbbaaaa");. 答案是 false, 明顯的, 你的 Code 有問題.. 我認為你 DP 只查前兩個字元, 一長就 fail 了. --.

推噓1(1推 0噓 6→)留言7則,0人參與, 最新作者eight0 (一直到今天)時間12年前 (2013/05/14 00:06), 編輯資訊
0
1
1
內容預覽:
原始網址:. http://www.careercup.com/question?id=14539805. 題目:. Three strings say A, B, C are given to you.. Check weather 3rd string is interleaved from s
(還有728個字)

推噓1(1推 0噓 3→)留言4則,0人參與, 最新作者eight0 (一直到今天)時間12年前 (2013/05/13 10:45), 編輯資訊
0
1
1
內容預覽:
稍微試了一下. 只要抓A的前兩個字元、B的前兩個字元、C的前兩個字元來比對就行了. http://jsfiddle.net/h73Fr/1/. 裡面的測資from討論串推文. --. (* ̄▽ ̄)/‧★*"`'*-.,_,.-*'`"*-.,_☆,.-*`. http://i.imgur.com/o

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者aceldama (2-4)時間12年前 (2013/05/12 04:14), 編輯資訊
0
0
0
內容預覽:
我覺得stack 可行 問題就是要解決怎麼re trace. stack tempA. while C not empty. if (top of stackA = top of stackB = top of stackC){. pop C. top of A add to end of temp
(還有501個字)

推噓4(4推 0噓 6→)留言10則,0人參與, 最新作者keeperkai (keeperkai)時間12年前 (2013/04/21 20:11), 編輯資訊
0
0
0
內容預覽:
一樣用flagA=0, flagB=0開始. flagC = 0代表目前在C裡面驗證的字元位置,令A[],B[],C[]為分別三個string. 基本精神為,從flagC開始一一把C往後分別跟A,B的字串進行比對,分別把與C相同的字元數存入sameLengthA sameLengthB,如果:1.s
(還有2061個字)