**Problem Statement:**

Given an array a of n integers find all possible Pythagorean triplets from the array.

### What is Pythagorean triplet?

A Pythagorean triple consists of three positive integers a, b, and c, such that a^{2} + b^{2} = c^{2}. this formula is derived from Pythagoras theorem: *“For every right angle triangle with side lengths a, b, and c=> a*^{2} + b^{2} = c^{2}“.

**Solution:**

[Read more…]