Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
RHCSA, RHCE, AWS, Docker, Kubernetes Training
Sanjeewani95
Updated:
Tuesday at 10:28 AM
🛡️ Kaspersky Antivirus – 1 Year / 1 Device | Rs. 2,300 | Only 9 Left
KSPathirana
Updated:
Monday at 2:42 PM
Ad icon
Professional CCTV Installation Service
Techguy231
Updated:
Sep 6, 2026
Ad icon
I'll research & write an article - Rs. 2000 onwards
Blogerwiki
Updated:
Sep 3, 2026
House Plan
lenura
Updated:
Sep 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
Please Help Me
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Harshi_Darshika" data-source="post: 17614608" data-attributes="member: 521342"><p>Please help me Guys... <img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /> Mekata podi help 1k denna puluwan kenek innawada?</p><p></p><p>Write methods (return type void) for each problem given below which take an array with 10000 integers (data type: int) as the input parameter and print expected output. The array is virtually broken into chunks of similar length and length of the chuck defined in the related question (given below). Items within a chunk are sorted in descending order. Your methods should print the starting index and the sum of the chunk which has maximum sum of its elements. If there are more than one chunk with maximum sum, very first applicable chunk should be taken as the solution. You are going to address a very specific problem (eg: number of elements in the array is fixed, chuck sizes are pre-defined) so your solution is NOT required to be a generic solution which works for any input.</p><p></p><p>i) Print starting index and sum of the chunk which has maximum sum of its elements when the chunk size is 100.</p><p>ii) If you think that you can come up with a higher optimized solution when the chunk size is 1000, write another method to print starting index and sum of its elements which has maximum sum among other chunks.</p><p>iii) If you think you have a better optimized solution if the chunk size is 10000, write an optimized method to print starting index of relevant chunk and its sum.</p><p></p><p>Here are some examples:</p><p></p><p>• In problem (i), if the chunk starting from 300 has the sum of 100000 and 100000 is the maximum sum among other chunks, and then you should print a similar text as following text.</p><p> “ Starting index : 300”</p><p> “ Sum of chunk : 100000”</p><p></p><p>• In problem (ii), if the chunk starting from 3000 has the sum of 1000000 and 1000000 is the maximum sum among other chunks, and then you should print a similar text as following text.</p><p> “ Starting index : 3000”</p><p> “ Sum of chunk : 1000000”</p></blockquote><p></p>
[QUOTE="Harshi_Darshika, post: 17614608, member: 521342"] Please help me Guys... :( Mekata podi help 1k denna puluwan kenek innawada? Write methods (return type void) for each problem given below which take an array with 10000 integers (data type: int) as the input parameter and print expected output. The array is virtually broken into chunks of similar length and length of the chuck defined in the related question (given below). Items within a chunk are sorted in descending order. Your methods should print the starting index and the sum of the chunk which has maximum sum of its elements. If there are more than one chunk with maximum sum, very first applicable chunk should be taken as the solution. You are going to address a very specific problem (eg: number of elements in the array is fixed, chuck sizes are pre-defined) so your solution is NOT required to be a generic solution which works for any input. i) Print starting index and sum of the chunk which has maximum sum of its elements when the chunk size is 100. ii) If you think that you can come up with a higher optimized solution when the chunk size is 1000, write another method to print starting index and sum of its elements which has maximum sum among other chunks. iii) If you think you have a better optimized solution if the chunk size is 10000, write an optimized method to print starting index of relevant chunk and its sum. Here are some examples: • In problem (i), if the chunk starting from 300 has the sum of 100000 and 100000 is the maximum sum among other chunks, and then you should print a similar text as following text. “ Starting index : 300” “ Sum of chunk : 100000” • In problem (ii), if the chunk starting from 3000 has the sum of 1000000 and 1000000 is the maximum sum among other chunks, and then you should print a similar text as following text. “ Starting index : 3000” “ Sum of chunk : 1000000” [/QUOTE]
Insert quotes…
Verification
Dahaya deken beduwama keeyada?
Post reply
Top
Bottom