Answer the question
In order to leave comments, you need to log in
The task from the introductory in the computer science center. How to decide?
Given an ordered array of natural numbers: Build an algorithm that checks whether all numbers can be divided into two parts so that the sums of the numbers in the parts differ by no more than two times. Estimate the running time of the algorithm, prove its correctness.
Suspiciously squint and recognize the backpack, in which you need to put from 0.25 to half the sum of all the elements.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question