最新 最热

设计模式入门:建造者模式

建造者模式中,一些基本部件的实现应该是不怎么变化的,它更关注于指挥者装配并组合部件的过程,对应生活中的KFC,汉堡、可乐、薯条等是不变的,而其组合是经常变化的,演变出各式各样的套餐。...

2021-08-19
1

05 Subtract the Product and Sum of Digits of an Integer

Given an integer number n, return the difference between the product of its digits and the sum of its digits.

2021-08-18
1

设计模式的通俗理解--建造者模式

本着让读者一看就懂的写作理念,我这里并不打算用官方那种难以理解的概念去解释建造者模式。简单粗暴直接举例说明

2021-08-17
1

LeetCode 0152 - Maximum Product Subarray

Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product.

2021-08-11
0

LeetCode 0238 - Product of Array Except Self

Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

2021-08-11
0

LeetCode 0318 - Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that eac...

2021-08-11
1

LeetCode 0343 - Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you c...

2021-08-11
0

LeetCode 0043 - Multiply Strings

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2.

2021-08-11
1

扒一扒那些叫欧拉的定理们(十二)——经济学里的欧拉定理

但是,欧拉所研究的范围早就依托于数学涉及到物理,天文等各个领域。在本系列文章的收尾部分,我们就来介绍一下,在现代经济学中一个非常重要的理论——边际生产力分配理论,也叫经济学欧拉定理。...

2021-08-06
0

设计模式-工厂模式

工厂方法(Factory Method)模式的意义是定义一个创建产品对象的工厂接口,将实际创建工作推迟到子类当中。核心工厂类不再负责产品的创建,这样核心类成为一个抽象工厂角色,仅负责具体工厂子类必须实现的接口,这样进一步抽象...

2021-07-27
1