05 2020 档案

摘要:题目: On an infinite number line (x-axis), we drop given squares in the order they are given. The i-th square dropped (positions[i] = (left, side_length 阅读全文
posted @ 2020-05-11 15:01 silentteller 阅读(308) 评论(0) 推荐(0)
摘要:题目: A Range Module is a module that tracks ranges of numbers. Your task is to design and implement the following interfaces in an efficient manner. ad 阅读全文
posted @ 2020-05-07 14:04 silentteller 阅读(328) 评论(0) 推荐(0)
摘要:简介 建造者模式使用多个简单的对象创建一个复杂的对象,用于将一个复杂的构建与其表示分离,使得同样的构建过程可以创建不同的表示,然后通过一个builder类创建最终的对象。 注意,建造者模式与工厂模式的最大区别是,建造者模式更关注产品的组合方式和装配顺序,而工厂模式关注产品的生产本身。 建造者模式在设 阅读全文
posted @ 2020-05-06 23:41 silentteller 阅读(181) 评论(0) 推荐(0)
摘要:简介 单例模式是保证系统实例唯一性的重要手段。单例模式首先通过将类的实例化方法私有化防止程序通过其他方式创建该类的实例,然后通过提供一个全局唯一获取该类实例的方法帮助用户获取该类的实例,用户只需也只能通过调用该方法获取类的实例。 单例模式的常见写法有懒汉式,饿汉式,静态内部类,双重校验锁等。 具体实 阅读全文
posted @ 2020-05-04 21:02 silentteller 阅读(240) 评论(0) 推荐(0)