The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Write a C /C++ program with a divide-and-conquer algorithm that finds the two indices (i and j, 1 <= i <=
j <= n) in an array of integers with the maximum sum of contiguous elements. For example, if the
array elements are: 2, 18, -22, 20, 8, -6, 10 -24, 13, 3, then the returned indices should be i=4 and
j=7.
for example,
Input: 2, 18, -22, 20, 8, -6, 10 -24, 13, 3,Â
Output:Â
Maximal sub array : I = 4 and j =
Â
Â
Â
INFSCI 2591: Algorithm Design
Project 1
Due: February 7, 2017
Write a program with a divide-and-conquer algorithm that finds the two indices (i and j, 1 <= i <=
j <= n) in an array of integers with maximum sum of contiguous elements. For example, if the
array elements are: 2, 18, -22, 20, 8, -6, 10 -24, 13, 3, then the returned indices should be i=4 and
j=7.
Submit your project in a single PDF file on courseweb. The file must include: (1) a pseudocode
for the algorithm and (2) the results of the program for several tests (your program must be tested
by using the test cases provided in courseweb). You should also submit the source code for the
program in one separate zip file.
Points
Pseudocode
Correct algorithm (handling all test cases)
Source code
Code readability/documentation 10
60
20
10 Total: 100
-----------