Skip to main content
deleted 9 characters in body
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38

Japt -gh, 1011 bytes

à f_x ¥VÃn¥VÃñl

Try it online!Try it online!

Japt -g, 10 bytes

à f_x ¥VÃn

Try it online!

Japt -h, 11 bytes

à f_x ¥VÃñl

Try it online!

deleted 252 characters in body
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38

Japt -g, 810 bytes

à æ_xf_x ¥V¥VÃn

Try it online!

##Explanation: à æ_x ¥V à // Unique permutations of the first input (array) æ // Return the first item where: _x // The sum ¥V // equals the second input

Outputs undefined if no solution is available.Try it online!

Japt, 8 bytes

à æ_x ¥V

Try it online!

##Explanation: à æ_x ¥V à // Unique permutations of the first input (array) æ // Return the first item where: _x // The sum ¥V // equals the second input

Outputs undefined if no solution is available.

Japt -g, 10 bytes

à f_x ¥VÃn

Try it online!

added 52 characters in body
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38

Japt, 8 bytes

à æ_x ¥V

Try it online!

##Explanation: à æ_x ¥V à // Unique permutations of the first input (array) æ // Return the first item where: _x // The sum ¥V // equals the second input

Outputs undefined if no solution is available.

Japt, 8 bytes

à æ_x ¥V

Try it online!

##Explanation: à æ_x ¥V à // Unique permutations of the first input (array) æ // Return the first item where: _x // The sum ¥V // equals the second input

Japt, 8 bytes

à æ_x ¥V

Try it online!

##Explanation: à æ_x ¥V à // Unique permutations of the first input (array) æ // Return the first item where: _x // The sum ¥V // equals the second input

Outputs undefined if no solution is available.

added 216 characters in body
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38
Loading
deleted 9 characters in body
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38
Loading
Source Link
Oliver
  • 7.9k
  • 2
  • 18
  • 38
Loading