Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 1.4 KB

File metadata and controls

21 lines (13 loc) · 1.4 KB

Maximum hard #array

by ch3cknull @ch3cknull

Take the Challenge

Description

Implement the type Maximum, which takes an input type T, and returns the maximum value in T.

If T is an empty array, it returns never. Negative numbers are not considered.

For example:

Maximum<[]> // never
Maximum<[0, 2, 1]> // 2
Maximum<[1, 20, 200, 150]> // 200

Advanced

Can you implement type Minimum inspired by Maximum?


Back Share your Solutions Check out Solutions