Skip to content

Instantly share code, notes, and snippets.

View mding5692's full-sized avatar
🏠
Working on personal projects

Michael D mding5692

🏠
Working on personal projects
View GitHub Profile
@mding5692
mding5692 / adjList.java
Created October 24, 2016 18:56
3 Graph representations - Object/Pointer, Adjacency List, Adjacency Matrix
// Uses Node class like below
/*Node(int val) {
Node next;
int val = val;
}*/
public HashMap<Integer,Node<Integer>> adjList(Pair pairArr) {
if (pairArr.length == 0) {
return null;
}
@mding5692
mding5692 / iterativeBFS.java
Created October 27, 2016 04:35
Review of BFS & DFS
// pretends Node is like this:
/* Node {
int data;
List<Integer> neighbors;
}
*/
public Node bfs(Node head, int findInt) {
Node result = new Node(-1); // null node basically
if (head == null) {
@mding5692
mding5692 / installOpenSSL.txt
Created December 23, 2016 22:46
Easy way to install OpenSSL on UNIX systems
Download from https://www.openssl.org/source/
Open terminal
Move to directory holding OpenSSL files
Type "open INSTALL"
Type "./config"
Type "make"
Type "make test"
Type "make install"