write a program to find the triplets from an array in which two elements sum is equal to third.prepare solution with time complexity o(n^3) in python
Answers
Answered by
3
Answer:
kylukyzkhzkdluxlypusljxlu
Explanation:
girl or boy
Answered by
0
Input: array = {12, 3, 4, 1, 6, 9}, sum = 24;
Output: 12, 3, 9
Explanation: There is a triplet (12, 3 and 9) present
in the array whose sum is 24.
Input: array = {1, 2, 3, 4, 5}, sum = 9
Output: 5, 3, 1
Explanation: There is a triplet (5, 3 and 1) present
in the array whose sum is 9.
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is such a triplet present in array, then print the triplet and return true. Else return false.
Similar questions
Math,
1 month ago
Social Sciences,
1 month ago
Physics,
1 month ago
English,
2 months ago
Math,
2 months ago
English,
9 months ago
Social Sciences,
9 months ago