Find Jobs
Hire Freelancers

Algorithm of getting minimum sum for contiguous integer array

$10-30 USD

Abgeschlossen
Veröffentlicht vor mehr als 2 Jahren

$10-30 USD

Bezahlt bei Lieferung
1. Problem Description. The creator of Squid Game decided to add one more game for the players. The players are required to form a team of k members to cover a land separated into fields of different areas. Each player must be assigned a number of contiguous fields in the land where he/she have to go through the entire field to collect hidden coins. Assuming that each field can be assigned to only one player, all players must be assigned to at least one field, and that it takes a player 1 unit of time to cover 1 m2 of land, you are required to find an assignment for the players to the fields such that the maximum time it takes a player in the team to cover his/her assigned fields is minimized. The land is represented by an array of integers representing the areas of its fields in m2. For example, if k = 2 and l = [100, 100, 100, 100], then the optimal solution is to assign Player 1 to the first two fields and to assign Player 2 to the last two fields making the maximum time a player needs 200 units of time. However, if k = 2 and l = [10, 20, 30, 40], then the best solution is to assign Player 1 to the first three fields requiring 60 units of time and to assign Player 2 to the last field requiring 40 units of time making the maximum time a player needs 60 units of time. 2. Deliverables. You are required to submit one Java file named with your ID (example [login to view URL]) containing the following two methods. a) public static String naive (int k, int[] l) that implements a naive brute force solution for the problem. b) public static String efficient (int k, int[] l) that implements the most efficient solution you can think of for the problem. Both methods return a string encoding of the solution represented as follows: maxTime;P1 fields;P2 fields;...;Pk fields where maxT ime is the minimized maximum time for a player and Pi f ields for 1 ≤ i ≤ k are the areas of the fields assigned to Player i separated by commas. 3. Sample Input/Output k=2, l=[100,100,100,100] Output: 200;100,100;100,100 k=2, l=[10,20,30,40] Output: 60;10,20,30;40
Projekt-ID: 32626036

Über das Projekt

10 Vorschläge
Remote Projekt
Aktiv vor 2 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
I have read your problem carefully and I'm confident that I can solve this problem. Contact me. ******
$15 USD in 1 Tag
0,0 (0 Bewertungen)
0,0
0,0
10 Freelancer bieten im Durchschnitt $25 USD für diesen Auftrag
Avatar des Nutzers
Hi there, I checked your requirements and guarantee you it's gonna be done within the next few hours. Let's contact via chat so that I can start work immediately. Wish you the best.
$30 USD in 1 Tag
5,0 (52 Bewertungen)
5,2
5,2
Avatar des Nutzers
Hello, I am a software and Web Developer. I hava also lot of experience in Designing. I have some rules and regulations before start of project: 1. Provide 100% work within deadline. 2. Provide unlimited revisions until employee satisfy 100% The area of experties are: 1. Java, JavaFX, JAVA( SWing), J2EE 2. PHP, HTML, CSS, BootStrap 3. MVC, C#, .NET 4. C/C++ Programming 5. Android Applications Developmet My main target is provide you a 100% work within your deadline and low budget. You get a good result after hiring me. So click award button for more discussion. Thanks lsmd
$50 USD in 1 Tag
5,0 (61 Bewertungen)
5,2
5,2
Avatar des Nutzers
Hi, I believe I have an efficient solution to this interesting algorithmic problem. Please message me to discuss it further.
$28 USD in 5 Tagen
5,0 (22 Bewertungen)
4,9
4,9
Avatar des Nutzers
Hello I just saw your requirements and after checking it I believe it is something which I can handle easily I'll provide you quality work with perfection as needed with guaranteed best rates you can sent me a message to discuss more details waiting for a response with your good name Thanks
$20 USD in 7 Tagen
5,0 (14 Bewertungen)
3,8
3,8
Avatar des Nutzers
Algorithm expert. Hi Client, I'll provid you with clear and quick result. I'm Ihor.K algorithm expert with 5 years of experience in C/C++/C#/Python. I have a strong grip on algorithms and data structure as I not only took part but won many programming contests. You can check my certificate in my portfolio here: www.freelancer.com./u/ihorkostiuchenko I'm interested to hear more about the project. When do you need this finished? If you award me the project, I'd pleased to discuss this further and get started for you as soon as possible. I'll show you my ability and I'm looking forward to working with you for a long time. Please contact me. Thanks! Ihor
$20 USD in 1 Tag
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
I have more than 10 years experience in programming. I will guarentee you a good quality of work on time and unlimited number of revisions until your satisfaction. Please feel free to contact me in order to discuss your request.
$30 USD in 1 Tag
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von EGYPT
Cairo, Egypt
5,0
1
Zahlungsmethode verifiziert
Mitglied seit Jan. 5, 2022

Kundenüberprüfung

Andere Aufträge von diesem Kunden

Analysis Function
$10-30 USD
Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.