上一页 1 2 3 4 5 6 ··· 18 下一页

2022年1月5日

摘要: Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example1: Input: r 阅读全文
posted @ 2022-01-05 07:48 codingEskimo 阅读(19) 评论(0) 推荐(0) 编辑

2021年12月29日

摘要: Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the sa 阅读全文
posted @ 2021-12-29 11:11 codingEskimo 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Example 1: Input: root = [1,2,2,3,4,4,3] 阅读全文
posted @ 2021-12-29 10:08 codingEskimo 阅读(14) 评论(0) 推荐(0) 编辑
摘要: Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they a 阅读全文
posted @ 2021-12-29 09:55 codingEskimo 阅读(20) 评论(0) 推荐(0) 编辑

2021年12月28日

摘要: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
posted @ 2021-12-28 07:09 codingEskimo 阅读(27) 评论(0) 推荐(0) 编辑

2020年10月20日

摘要: 模板模式(Template Method Pattern) Define the skeleton of an algorithm in operations, deferring some steps to subclasses. Template Method lets subclasses r 阅读全文
posted @ 2020-10-20 07:45 codingEskimo 阅读(72) 评论(0) 推荐(0) 编辑

2020年10月15日

摘要: 抽象工厂模式(Abstract Factory Pattern) Provide an interface for creating families of related or dependent objects without specifying their concerete classes 阅读全文
posted @ 2020-10-15 06:06 codingEskimo 阅读(77) 评论(0) 推荐(0) 编辑

2020年10月14日

摘要: 工厂模式 Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation 阅读全文
posted @ 2020-10-14 11:53 codingEskimo 阅读(56) 评论(0) 推荐(0) 编辑

2020年10月12日

摘要: 单例模式(Singleton Pattern) Ensure a class has only one instance, and provide a global point of access to it.(确保只有一个实例, 而且自行实例化并向整个系统提供这个实例。) 模板 通用代码 publ 阅读全文
posted @ 2020-10-12 05:34 codingEskimo 阅读(70) 评论(0) 推荐(0) 编辑

2020年10月11日

摘要: 六大原则 单一职责原则: There should be no more than one reason for a class to change 最佳实践: 接口的设计一定要做到单一职责,类的设计尽量做到只有一个原因引起变化。 里氏替换原则: Functions that use pointer 阅读全文
posted @ 2020-10-11 07:47 codingEskimo 阅读(90) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页

导航