随笔分类 - 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
阅读全文
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o
阅读全文
摘要: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
阅读全文
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a
阅读全文
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or
阅读全文
摘要:Shuffle a set of numbers without duplicates. Example:
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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(); ...
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号