随笔分类 -  Design Pattern

摘要:Error Retries and Exponential Backoff in AWS https://docs.aws.amazon.com/general/latest/gr/api-retries.html Numerous components on a network, such as 阅读全文
posted @ 2019-08-19 01:56 北叶青藤 阅读(430) 评论(0) 推荐(0)
摘要:How this game is playe can be found at here. Python ROWS = 6 COLS = 7 def create_board(): return [[' ' for _ in range(COLS)] for _ in range(ROWS)] def 阅读全文
posted @ 2019-08-16 11:36 北叶青藤 阅读(682) 评论(0) 推荐(0)
摘要:Design and implement a data structure for a compressed string iterator. It should support the following operations: next and hasNext. The given compre 阅读全文
posted @ 2019-08-12 05:14 北叶青藤 阅读(182) 评论(0) 推荐(0)
摘要: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 @ 2019-08-12 02:01 北叶青藤 阅读(381) 评论(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 @ 2019-07-31 14:10 北叶青藤 阅读(206) 评论(0) 推荐(0)
摘要:From:http://bradforj287.blogspot.com/2010/11/efficient-circular-buffer-in-java.html 阅读全文
posted @ 2017-01-05 14:56 北叶青藤 阅读(290) 评论(0) 推荐(0)
摘要:Part 1: 前言: 最近看了一些关于短址(short URL)方面的一些博客,有些博客说到一些好的东西,但是,也不是很全,所以,这篇博客算是对其它博客的一个总结吧。 介绍: 短址,顾名思义,就是把长的 URL 转成短的 URL, 现在提供这种服务的有很多公司,我们以google家的 URL sh 阅读全文
posted @ 2017-01-04 08:21 北叶青藤 阅读(584) 评论(0) 推荐(0)
摘要:From: https://discuss.leetcode.com/topic/89/write-elevator-program-using-event-driven-programming/9 We can divide into three main components: User Use 阅读全文
posted @ 2016-11-09 02:27 北叶青藤 阅读(352) 评论(0) 推荐(0)
摘要:Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: A move is guaranteed to be valid and 阅读全文
posted @ 2016-07-27 21:01 北叶青藤 阅读(179) 评论(0) 推荐(0)
摘要:Given an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤ 9, count the total number of unlock patterns of the Android lock scre 阅读全文
posted @ 2016-07-26 23:43 北叶青藤 阅读(321) 评论(0) 推荐(0)
摘要: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-07-13 02:00 北叶青藤 阅读(264) 评论(0) 推荐(0)
摘要:Factory is a design pattern in common usage. Implement a ShapeFactory that can generate correct shape. You can assume that we have only tree different 阅读全文
posted @ 2016-07-12 06:37 北叶青藤 阅读(540) 评论(0) 推荐(0)