Skip to content

Commit b2429a8

Browse files
committed
project
1 parent e02aa14 commit b2429a8

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

.classpath

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path=""/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="output" path=""/>
6+
</classpath>

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.class

.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Load Balancing</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

LoadBalancing.java

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import java.util.*;
2+
3+
public class LoadBalancing {
4+
5+
6+
public void balanceMachines(int machineCount, int[][] jobs){
7+
System.out.println(1);
8+
}
9+
10+
public static void main(String[] args) {
11+
LoadBalancing loadBalancer = new LoadBalancing();
12+
int[][] jobs1 = {
13+
{1, 2},
14+
{2, 2},
15+
{3, 2},
16+
{4, 2},
17+
{5, 3},
18+
{6, 1},
19+
{7, 4}
20+
};
21+
loadBalancer.balanceMachines(4, jobs1);
22+
23+
ArrayList arrlist = new ArrayList();
24+
Collections.addAll(arrlist, "1","2","3");
25+
System.out.println("Final collection value: "+arrlist);
26+
}
27+
28+
}

0 commit comments

Comments
 (0)