Skip to content

Instantly share code, notes, and snippets.

View joelsimonoff's full-sized avatar

Joel Simonoff joelsimonoff

View GitHub Profile
@joelsimonoff
joelsimonoff / rgb.go
Last active April 25, 2017 04:38
Code that solves the problem of organizing an array (I used a golang slice) with a random distribution of red, green and blue values, into red values followed by blue values followed by green values, in O(n) time.
//
// Written By Joel Simonoff
// April 24, 2017
//
package main
import (
"fmt"
"math/rand"