上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 72 下一页
摘要: 工厂模式 工厂模式(Factory Pattern)是 Java 中最常用的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个共同的接口来指向新创建的对象。 介绍 意图:定义一个创建对象的接口, 阅读全文
posted @ 2018-10-01 20:16 乐乐章 阅读(438) 评论(0) 推荐(0) 编辑
摘要: DescriptionHintsSubmissionsDiscussSolution Pick One Given two non-negative integers num1 and num2 represented as strings, return the product of num1 a 阅读全文
posted @ 2018-08-11 00:29 乐乐章 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
posted @ 2018-07-18 22:02 乐乐章 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique q 阅读全文
posted @ 2018-07-15 17:20 乐乐章 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
posted @ 2018-07-15 16:13 乐乐章 阅读(497) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文
posted @ 2018-07-15 15:35 乐乐章 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2018-07-11 22:25 乐乐章 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl 阅读全文
posted @ 2018-07-10 21:49 乐乐章 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-white 阅读全文
posted @ 2018-07-10 21:25 乐乐章 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], 阅读全文
posted @ 2018-06-15 22:41 乐乐章 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 72 下一页