Skip to content

Commit 13bb107

Browse files
committed
Pythagorean Triplets
1 parent dce1bbc commit 13bb107

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
Pythagorean Triplets
3+
Given an array find all the pythagorean triplets (a^2 + b^2 = c^2)
4+
*/
5+
6+
type triplet struct {
7+
a,b,c int
8+
}
9+
10+
func PythagoreanTripletsBruteForce(array) []triplets {
11+
tripletArray := []triplet
12+
for _, val
13+
}
14+
15+
func main() {
16+
array := []int{4,16,1,2,3,5,6,8,25,10}
17+
tripletArray := PythagoreanTripletsBruteForce(array)
18+
19+
}

0 commit comments

Comments
 (0)