This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Generic Directed Weighted Graph with Dijkstra's Shortest Path Algorithm | |
* by /u/Philboyd_Studge | |
* for /r/javaexamples | |
*/ | |
import java.util.List; | |
import java.util.Queue; | |
import java.util.PriorityQueue; | |
import java.util.Deque; | |
import java.util.LinkedList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Generic Min/Max Binary Heap | |
* for /r/javaexamples | |
* | |
*/ | |
import java.util.Arrays; | |
@SuppressWarnings("unchecked") | |
/** | |
* Creates an array-based binary heap. Defaults to 'min' (Priority Queue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Generic Self-Balancing Key-Value Binary Search Tree | |
for /r/javaexamples | |
by /u/Philboyd_Studge | |
*/ | |
import java.util.Queue; | |
import java.util.LinkedList; | |
import java.util.List; | |
@SuppressWarnings("unchecked") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.RandomAccess; | |
/** | |
* Dynamic Array class (based on java.util.ArrayList) | |
* for /r/JavaExamples - for tutorial purposes - | |
* @author /u/Philboyd_Studge on 11/18/2015. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Inventory class | |
* for /r/javaexamples | |
* by /u/Philboyd_Studge | |
* | |
*/ | |
package philboyd.studge; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.util.Random; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util; | |
/** | |
* @author /u/Philboyd_Studge on 12/26/2016. | |
* | |
* This enum set is for simplifying movement on a 2d integer grid | |
* Assuming the Y axis is -up(north) and +down(south), | |
* and X axis is -right(west) and +left(east) | |
*/ | |
public enum Direction { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util; | |
import java.util.List; | |
public abstract class AdventOfCode { | |
protected List<String> input; | |
public AdventOfCode(List<String> input) { | |
this.input = input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fvcalc; | |
import javafx.event.ActionEvent; | |
import javafx.fxml.FXML; | |
import javafx.scene.control.ComboBox; | |
import javafx.scene.control.Label; | |
import javafx.scene.control.TextField; | |
import logic.FVLogic; | |
import logic.FVLogic.CompoundType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.AdventOfCode; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.Function; | |
public class Day25 extends AdventOfCode { |
NewerOlder