Find a pythagorean triplet from an array
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 a2 + b2 = c2. this formula is … [Continue reading]
Number Puzzle #29
Number Puzzle #28
3 SUM problem
Problem Statement: Given a set S of n integers find all possible subsets(a,b,c) such that a + b + c = 0. Solution: Brute force approach is of O(n^4) but we can solve it in O(n^2) by using the approach in Non duplicate pairs that sum to S. First … [Continue reading]
Number Puzzle #27
Number Puzzle #26
This puzzle is courtesy , shared on puzzlersworld facebook page. … [Continue reading]
Number Puzzle #25
Number Puzzle #24
Number Puzzle #23
- « Previous Page
- 1
- …
- 95
- 96
- 97
- 98
- 99
- …
- 116
- Next Page »