Skip to content

Instantly share code, notes, and snippets.

View hornd's full-sized avatar

Doug Horn hornd

  • Google
  • Alameda, CA
View GitHub Profile
@hornd
hornd / gist:0eb46cbaed90da93e63405b78310fca5
Created April 8, 2016 00:02
Longest palindromic subsystem
public class Solution {
public String longestPalindrome(String ss) {
if (ss == null) {
return null;
}
if (ss.length() == 1) {
return ss;
}
package me.lory;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Collection;
import me.lory.irc.ServerDescription;
/**
* Describes an IRC server and a connection to that IRC server. Servers are
#!/usr/bin/env python
"""
IRC Related stuff
"""
import sys
import socket
import re
import time
import imp

Keybase proof

I hereby claim:

  • I am hornd on github.
  • I am dhorn (https://keybase.io/dhorn) on keybase.
  • I have a public key whose fingerprint is A5F7 C9B1 0CD4 C413 6229 A671 8D25 30A0 7DDA 2F8E

To claim this, I am signing this object:

#!/usr/bin/env python
"""
IRC Related stuff
"""
import sys
import socket
import re
import time
import imp
@hornd
hornd / gist:4964421
Created February 15, 2013 23:20
Given an integer M and an integer N, return the result of summing integer N with integer M
/**
* @author hornd
*/
public class IntegerAdder extends IntegerArithmetic {
public IntegerAdder() {
super();
}
/* (non-Javadoc)
* @see com.hellayolo.math.IntegerArithmetic#GetResult(int, int)