摘要: Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regu... 阅读全文
posted @ 2015-08-18 23:02 amazingzoe 阅读(169) 评论(0) 推荐(0)
摘要: Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.Analyse: For each nod... 阅读全文
posted @ 2015-08-18 07:05 amazingzoe 阅读(260) 评论(0) 推荐(0)
摘要: Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o... 阅读全文
posted @ 2015-08-18 03:50 amazingzoe 阅读(120) 评论(0) 推荐(0)
摘要: Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... 阅读全文
posted @ 2015-08-18 03:11 amazingzoe 阅读(135) 评论(0) 推荐(0)