Skip to content

Instantly share code, notes, and snippets.

View charlierm's full-sized avatar

Charlie Mills charlierm

View GitHub Profile
@charlierm
charlierm / Collision.java
Last active December 17, 2015 22:59
A simple Java program showing example usage of the synchronized keyword.
import java.lang.Runnable;
import java.lang.Thread;
/**
* The Main Class.
**/
public class Collision {
/**
* Main entry point into the application.
@charlierm
charlierm / linked-list.c
Last active December 17, 2015 22:29
A painfully simple linked list written in C, with example usage.
#include <stdlib.h>
#include <stdio.h>
/**
Structure for storing an individual node in the list.
**/
typedef struct Node
{
int data;
struct Node* next;
@charlierm
charlierm / linked_list.py
Last active December 17, 2015 22:28
A very simple linked list in Python.
import random
class Item:
next = None
data = 0
def __init__(self):
self.data = random.random()