Difference of Volumes of Cuboids

Lee·2022년 7월 1일

Algorithm

목록 보기
34/92
post-thumbnail

❓ You Can't Code Under Pressure #1

Q. Code as fast as you can! You need to double the integer and return it.

✔ Solution

function findDifference(a, b) {
  return Math.abs(a.reduce((a, b) => a * b) - b.reduce((a, b) => a * b))
}
profile
Lee

0개의 댓글