Equilibrium index: https://codility.com/demo/results/demo8M3XWQ-TWF/
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 Foundation | |
public typealias JSON = AnyObject | |
public func JSONWithData(data: NSData) -> JSON? { | |
do { | |
let j = try NSJSONSerialization.JSONObjectWithData(data, options: []) | |
return j | |
} catch _ { | |
return nil |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer