随笔分类 -  design a game/service/feature

362. Design Hit Counter
摘要:Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are being made ... 阅读全文

posted @ 2018-11-09 11:31 猪猪🐷

353. Design Snake Game
摘要: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 snake is initially positioned at the top left corner ... 阅读全文

posted @ 2018-11-06 08:14 猪猪🐷

348. Design Tic-Tac-Toe
摘要:Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: 1. A move is guaranteed to be valid and is placed on an empty block. 2. Once a winnin... 阅读全文

posted @ 2018-11-06 08:13 猪猪🐷

588. Design In-Memory File System
摘要:Design an in-memory file system to simulate the following functions: ls: Given a path in string format. If it is a file path, return a list that only 阅读全文

posted @ 2018-11-06 08:12 猪猪🐷

导航