Write a C/C++ program to solve the “maximum contiguous sum” problem using two possible algorithms: the naïve one which uses nested loops to examine all possible sequences and a divide and conquer version which divides the problem in two pieces and then combines the result from each part. Your program must take the values to be placed in an array from a file where the values will be found in one line separated by commas. Your program must take the data file name as an argument and parse the file correctly regardless of spaces introduced between the commas. Your program output will be exclusively the maximum sum value for algorithm 1 and algorithm 2 with their respective execution time reported on the side in seconds

Posted by:


Post date:




Download link: dfg.pdf

upload program

    This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
    C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.