I hereby claim:
- I am rainiera on github.
- I am rainiera (https://keybase.io/rainiera) on keybase.
- I have a public key whose fingerprint is DC11 1E9D 7F57 B3F9 6340 8914 C246 9D53 5B5A 8553
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class PointDistance implements Comparable<PointDistance> { | |
Point p; | |
double dist; | |
public PointDistance(Point p, double dist) { | |
this.p = p; | |
this.dist = dist; | |
} | |
public int compareTo(PointDistance other) { |
/** | |
* Returns an ArrayList of Strings of names that contain three or more | |
* of the same letter. | |
* @return A list of the names that contain three or more of the same letter. | |
*/ | |
public ArrayList<String> tripleDuplicates() { | |
ArrayList<String> tripleDuplicates = new ArrayList<String>(); | |
for (NameRecord name : this.names) { | |
HashMap<Character, Integer> map = new HashMap<Character, Integer>(); | |
// I don't want case-sensitive letter frequencies |
import java.util.HashSet; | |
import java.util.Random; | |
/* | |
* Given a string, write a function that returns the string, unaltered. | |
*/ | |
public class StringString { |
* (time in seconds) | |
* | |
* Title kb Total Distinct | |
* | |
* The Cat In The Hat 7 504 1622 | |
* SortedSet time: 0.0343 | |
* UnsortedSet time: 0.0169 | |
* Java HashSet time: 0.0128 | |
* Java TreeSet time: 0.0141 | |
* |
public class HPriorityQueue<E extends Comparable<E>> { | |
private PQNode<E> first; | |
private PQNode<E> last; | |
private int size; | |
public HPriorityQueue() { | |
first = null; | |
last = null; | |
size = 0; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
int factorial(int n) { | |
int ans[200]; // answer can have a max of 200 digits. | |
int temp, // <- carry | |
m, // <- ones place of the prod, to put in the array | |
prod, // product of the current digit |
#include "mpi.h" | |
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
MPI_Init(&argc, &argv); | |
int rank; | |
int size; | |
MPI_Comm_rank(MPI_COMM_WORLD, &rank); | |
MPI_Comm_size(MPI_COMM_WORLD, &size); | |
int slice = 45200/32; |
#include "mpi.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
/* | |
* Each process computes random number | |
* Root process finds and prints the maximum generated value | |
* Have each process print its value | |
* |
# Vim | |
git clone https://github.com/amix/vimrc.git ~/.vim_runtime | |
sh ~/.vim_runtime/install_awesome_vimrc.sh | |
# Zsh | |
apt-get install -y zsh git-core | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |