Yahoo India Web Search

Search results

  1. Given an array arr of size n and an integer x. Find if there's a triplet in the array which sums up to the given integer x. Examples Input:n = 6, x = 13, arr [] = [1,4,45,6,10,8] Output: 1 Explanation: The triplet {1, 4, 8} in the array sums up to 13.

  2. Given an array A[] of N integers and an integer X. The task is to find the sum of three integers in A[] such that it is closest to X. Example 1: Input: N = 4 A[] = {-1 , 2, 1, -4} X = 1 Output: 2 Explaination: Sums

  3. Oct 17, 2023 · Triplet Sum in Array (3sum) - GeeksforGeeks. Last Updated : 17 Oct, 2023. Given an array arr [] of size n and an integer X. Find if there’s a triplet in the array which sums up to the given integer X. Examples: Input: array = {12, 3, 4, 1, 6, 9}, sum = 24; Output: 12, 3, 9. Explanation: There is a triplet (12, 3 and 9) present.

  4. practice.geeksforgeeks.org › problems › 3-sum-closestGeeksforGeeks

    We would like to show you a description here but the site won’t allow us.

  5. leetcode.com › problems › 3sum3Sum - LeetCode

    15. 3Sum. Medium. Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. Example 1:

  6. leetcode.com › problems › 3sum3Sum - LeetCode

    Can you solve this real interview question? 3Sum - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

  7. We would like to show you a description here but the site won’t allow us.

  8. takeuforward is the best place to learn data structures, algorithms, most asked coding interview questions, real interview experiences free of cost.

  9. Given an array, arr of n integers, and another number target, find three integers in the array such that their sum is closest to the target. Return the sum of the three integers.Note: If there are multiple solutions, print the maximum one. Examples :

  10. www.hackerrank.com › challenges › triple-sumTriple sum | HackerRank

    Function Description. Complete the triplets function in the editor below. It must return the number of distinct triplets that can be formed from the given arrays. triplets has the following parameter (s): a, b, c: three arrays of integers . Input Format. The first line contains integers , the sizes of the three arrays.