随笔分类 -  Design

摘要:Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u 阅读全文
posted @ 2016-12-04 14:14 微微程序媛 阅读(203) 评论(0) 推荐(0)
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2016-12-04 11:21 微微程序媛 阅读(207) 评论(0) 推荐(0)
摘要:Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. Show Company T 阅读全文
posted @ 2016-12-04 10:35 微微程序媛 阅读(140) 评论(0) 推荐(0)
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a 阅读全文
posted @ 2016-12-01 09:40 微微程序媛 阅读(159) 评论(0) 推荐(0)
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or 阅读全文
posted @ 2016-12-01 06:28 微微程序媛 阅读(176) 评论(0) 推荐(0)
摘要:Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2016-10-31 06:07 微微程序媛 阅读(288) 评论(0) 推荐(0)
摘要:Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. The snak 阅读全文
posted @ 2016-10-30 14:47 微微程序媛 阅读(222) 评论(0) 推荐(0)
摘要:Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from source or 1st cell. Basical 阅读全文
posted @ 2016-10-30 13:19 微微程序媛 阅读(849) 评论(0) 推荐(0)
摘要:import java.util.*; class Node{ String val; Set children = new HashSet(); // at most 15 children; public Node(String val){ this.val = val; this.children = new HashSet(); ... 阅读全文
posted @ 2016-10-26 04:01 微微程序媛 阅读(271) 评论(0) 推荐(0)
摘要:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the 阅读全文
posted @ 2016-10-26 03:57 微微程序媛 阅读(564) 评论(0) 推荐(0)