20240226-Circular-Array-Ood Anonymous published on 2024-02-26Question 實作CircularArray class可以有效翻轉array like data structure,這個class需使用generic type(template),且支援iter notaion(obj o: circularArray)
20240226-Minesweeper-Ood Anonymous published on 2024-02-26Question 踩地雷遊戲,玩家直到整個盤都探索完畢,玩家點選後如果是炸彈就輸掉,若是空白,消除所有鄰近空白及數字
20240222-Content-Analysis Anonymous published on 2024-02-22 文字清理(去除符號、轉小寫) 依據詞頻拆分關鍵字網路 邊/連結厚度代表關鍵字的相依頻率 節點大小代表專見字的頻率 Ref
20240221-Othello-Ood Anonymous published on 2024-02-21Question 設計黑白棋的OOD,黑白棋是如果周遭(上下左右)被圍起來就更換中間(被包圍)顏色,到一方無法下任何棋結束。 Solution core object: game, board, pieces, players Shold BlackPiece and WhitePiece be classes? 因為棋會一直被翻轉,有一個統一Piece Class可能比較好 Do we need separate Board and Game classes? Pros 邏輯上分開board跟game Cons 需要額外layer Who keeps Score? 可能可以使用Group、Piece、Board group 我們暫時使用board存,這樣分數可以由Board分組 Should Game be a Singleton class? Singleton 好處是所有人可呼叫,而不用每次都pass ref,但只能被初始化一次,與interviewer討論是否可以這樣做 Ref