mirror of
https://github.com/type-challenges/type-challenges.git
synced 2026-02-01 15:47:22 +00:00
1.5 KiB
1.5 KiB
Two Sum

by PsiloLau @Psilocine
Given an array of integers nums and an integer target, return true if two numbers such that they add up to target.
For example
type sum1 = TwoSum<[3, 2, 4], 6> // true
type sum2 = TwoSum<[2, 7, 11, 15], 15> // false