Skip to content

tcpos-learning/win-a-book

Repository files navigation

win-a-book

Crazy questions for crazy developers

Maximum without comparators

Write a function that takes 2 integers and returns the greater of them, or one of them if they are equal. You should not use comparators such as >, <, ==, Math.Max(), if, then, else, switch and the like.

Example:

Max(0, 0) => 0
Max(10, 0) => 10
Max(0, 10) => 10
Max(-1, 0) => 0
Max(-1, 1) => 1
Max(-10, -1) => -1

About

Crazy questions for crazy developers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages