Skip to content
6 changes: 4 additions & 2 deletions git-intro/HELPME.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ Names that have been striked through with a line are people who have graduated o
Names with **bold** are team leads and senior members

# Super Exclusive List
Super Exclusive List is Up-To-Date as of **February 02, 2022 @ 5:45pm EST**
Super Exclusive List is Up-To-Date as of **October 25, 2022 @ 11:22pm EST**
* ~~UWO SAE AERO DESIGN TEAM~~
* Zachary D'Souza
* Stuart Wing
* Jeff St. Jean
* Jeff St. Jean
* Alex Fernandes

38 changes: 38 additions & 0 deletions git-intro/fizzbuzz/java/fizzbuzz.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* To run the code, you must have java installed
Go to: https://www.oracle.com/java/technologies/downloads
Once installed, open your terminal and type:
`java fizzbuzz.java`

Make sure you are in the java folder so that the
code file can be found
*/

public class fizzbuzz {

public static void main(String[] args) {
int lower = 0;
int upper = 100;

int fizz = 1;
int buzz = 2;

for (int i = lower; i <= upper; i++){
boolean isFizz = i % fizz == 0;
boolean isBuzz = i % buzz == 0;

if(isFizz && isBuzz){
System.out.println("fizzbuzz");
} else if(isFizz){
System.out.println("fizz");
} else if(isBuzz) {
System.out.println("buzz");
} else {
System.out.println(i);
}
}


}

}
50 changes: 50 additions & 0 deletions git-intro/twosum/java/twosum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
To run the code, you must have a rust installed
Go to: https://java.com/en/download/help/download_options.html#windows

Once installed, open your terminal and type:
`javac twosum.java`
`./twosum` - Linux or macOS
`.\twosum.exe` - Windows

** Make sure you are in the java folder so that the
** code file can be found.
*/


import java.util.HashMap;
class Twosum {
public static void main(String[] args) {
// Target number to compute
int target = 14;

// The array of values that can be used
// Remember, arrays are 0 indexed
int[] data= new int[]{ 8, 2, -3, 48, 5, 6, 46, 8, 19, -10,
11, 32, 6, 26, 15, -16, 20, 118, 30, 20,
21, 52, -23, 54, 21, 26, 37, 70, -29, 30};

twosum(data,target);
}

public static void twosum(int[] data, int target){
int complement;
HashMap<Integer,Integer> hMap = new HashMap<Integer,Integer>();
boolean Sol=true;

for(int i=0;i<data.length;i++){

complement = target - data[i];
if(hMap.containsKey(complement)){
System.out.println("1 Value at index "+i+ "is "+data[i]);
System.out.println("2 Value at index "+hMap.get(complement)+ "is "+complement);
Sol = false;
}
hMap.put(data[i],i);
}
if(Sol)
System.out.println("No Solution");

}
}