Skip to content

Instantly share code, notes, and snippets.

View micahstairs's full-sized avatar

Micah Stairs micahstairs

  • Waterloo, ON, Canada
View GitHub Profile
@micahstairs
micahstairs / Rotate.java
Last active September 24, 2015 15:45
Solution for Grid Problems 1 (https://youtu.be/9DyQTftdiBY)
import java.util.*;
public class Rotate {
static final int BLANK = 0;
static final int RED = 1;
static final int BLUE = 2;
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
import java.util.*;
public class MagicTrick {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int t = Integer.valueOf(sc.nextLine());
@micahstairs
micahstairs / FileFixIt.java
Last active August 29, 2015 14:27
Solution for Graph Theory 1 [Programming Competition Problems] (https://www.youtube.com/watch?v=piKq7gvOPS8)
import java.util.*;
public class FileFixIt {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = Integer.valueOf(sc.nextLine());
@micahstairs
micahstairs / CentauriPrime.java
Last active August 29, 2015 14:27
Solution for String Manipulation 2 [Programming Competition Problems] (https://www.youtube.com/watch?v=bC7PYm9s1Vc)
import java.util.*;
public class CentauriPrime {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = Integer.valueOf(sc.nextLine());
@micahstairs
micahstairs / ReverseWords.java
Last active July 21, 2018 12:56
Solution for String Manipulation 1 [Programming Competition Problems] (https://www.youtube.com/watch?v=LURXsBIoSqI)
import java.util.*;
public class ReverseWords {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int nLines = Integer.valueOf(sc.nextLine());