For the best experience, increase the window size or view on a laptop or desktop device
Last updated: Pending
Title | ||
|---|---|---|
Loading... | ||
1/1
No questions are available yet
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
Given an integer array of length n, return a result array of length n-2, where result[i] = 1 if:
array[i]^2 + array[i+1]^2 = array[i+2]^2,array[i+1]^2 + array[i+2]^2 = array[i]^2, andarray[i]^2 + array[i+2]^2 = array[i+1]^2.Otherwise, result[i] = 0.
Given an integer array of length n, return a result array of length n-2, where result[i] = 1 if:
array[i]^2 + array[i+1]^2 = array[i+2]^2,array[i+1]^2 + array[i+2]^2 = array[i]^2, andarray[i]^2 + array[i+2]^2 = array[i+1]^2.Otherwise, result[i] = 0.
Output