Draft

3-Sum

Description:

Your task is to find 3 smallest numbers that add up to n.
You will receive 2 arguments. List filled with positive integers and n.
List will have length
Return [-1] if solution is not possible.

Input data
    100 ≤ 200000

Example

program([1,2,3,4,5], 10)

Solution
``` [1,4,5] ```
l = [2,4,2,5,7,8,4,12,3,57,8,2,21,1,4,56,7,8,4,2,1,2,4,5,7,85,9,7,9,2]
program(l, 24)

# output [1, 2, 21]
Algorithms
Data Structures

Stats:

CreatedMar 20, 2017
Warriors Trained119
Total Skips3
Total Code Submissions486
Total Times Completed12
Python Completions12
Total Stars5
% of votes with a positive feedback rating55% of 10
Total "Very Satisfied" Votes5
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes4
Total Rank Assessments8
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • smiks Avatar
Ad