Login

Create Account
+14156709189
info@expertsmind.com
Submit Homework/Assignment
Get quote & make Payment
Get Solution
Matlab, engineering, Other Engineering
The 3 sum problem: (20 pts.)
Provided a 1D array of integers, find all combinations of 3 values from this set such that:
a+b+c=0
For example, if one were provided with the set [3 1 3 4 6], the resulting answers would be [3 1
4], [3 1 4], and [3 3 6], as these are the three sets of three values which sum to zero from the
provided set. Notice that the first and second solution appear to be the same, but correspond to two
solutions for the two different 3s in the provided set.
Your code should return the answer in 2D array format, where each row is a solution set (3
columns per row). If no solution sets can be found for a given input, the code should output a value of
zero.
For this assignment you should find or develop an algorithm for finding these solutions. Once
you have found or developed this algorithm, create a flowchart for this algorithm. Please conform to
the algorithm format outlined in class.
Your code should be adequately commented, such that one would be able to understand your
code by reading comments only. Your code should also include an initial code block giving a brief
overview of how to use the function and your solution process, so that someone can query your
program for this code block using the help command.
Develop and implement a method to identify and remove and solutions which are numerically
equivalent, so that the result from your code doesn''t have any repeated solutions. This should be able to
match solutions which contain the same values but in different orders. This means that if the sets [3 1
4] and [3 4 1] are in the solution your method should still identify them as equivalent and only return
one of them.
Posted Date: 2/20/2012 1:46:29 AM  Location : United States
Ask an Expert
Related Discussions:
Matlab, engineering, Assignment Help, Ask Question on Matlab, engineering, Get Answer, Expert's Help, Matlab, engineering Discussions
Write discussion on Matlab, engineering
Your posts are moderated
Write your message here..
Related Questions
Cost of debt, A company issues 15year, $1,000 parvalue bonds, with a coup...
A company issues 15year, $1,000 parvalue bonds, with a coupon rate of 5%. The bonds are sold for $619.70. The tax rate is 30%. Compute the cost of debt before taxes and after tax
Law of gearing, define lawof gearing
define lawof gearing
Dsp, find IDFT of the sequence X(k)={5,0,1,j,0,1,0,1,j,0}
find IDFT of the sequence X(k)={5,0,1,j,0,1,0,1,j,0}
Binary cycle, Consider the binary cycle using the sodium and steam/water in...
Consider the binary cycle using the sodium and steam/water in the sketch below and operating at conditions in Table 1. Draw T S Diagram and find the thermal cycle efficiency
Inhibit gate, Inhibit Gate Occasionally it is required to 'hold' one in...
Inhibit Gate Occasionally it is required to 'hold' one input to an AND gate at a particular logic level in order to disable the entire gate. One method of representing this sy
Interlaminar shear strength , Composites have low shear strengths compared ...
Composites have low shear strengths compared to longitudinal strengths. The ILSS test is a simple 3 point bend test, requiring a small amount of material. A span to depth ratio
Phase array modelling, QUESTION: Modelling of phase array antenna for medic...
QUESTION: Modelling of phase array antenna for medical imaging. INSTRUCTION: The expert must provide a correct mathematical model solution and detail by detail steps of how it can
Noise suppression in aircraft design, Noise Suppression in Aircraft Design:...
Noise Suppression in Aircraft Design: It has been seen that the first step towards noise suppression is at the design stage of the rotating and static parts of the engine. The
Extrusion, Extrusion : In this method of forging, the metal slug is forced...
Extrusion : In this method of forging, the metal slug is forced to pass through a die under the action of intense of hydraulic pressure. The process can be viewed as squeezing the
HELP!!, HELP IN ELECTRONIC...I AM DOING ELECTRONIC ENG. ... GUIDE ME THE WA...
HELP IN ELECTRONIC...I AM DOING ELECTRONIC ENG. ... GUIDE ME THE WAY...
Assignment Help
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
ExpertsMind Services
Online Tutoring
Projects Assistance
Exam Preparation
Coursework Help
Programming Courses
Engineering Courses
Why Us ?
~Experienced Tutors
~24x7 hrs Support
~Plagiarism Free
~Quality of Work
~Time on Delivery
~Privacy of Work