This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
struct ImageConstants { | |
static let gifDelayTime: NSNumber = 2 | |
static let gifLoopCount:NSNumber = 10 | |
} | |
extension NSImage { | |
//swift 2.0 translation/adaptation from https://gist.github.com/akisute/1141953 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DP(i,j): | |
soln = i*n array with val inited to -1 | |
return helper(i,j, soln) | |
helper(i, j, soln): | |
#first iterate through all the smallest lens, then build on those | |
for 1 to (j-i) as len: | |
#make j always len away from i | |
j = i + len - 1 | |
bestsofar = infin |