I hereby claim:
- I am chefnobody on github.
- I am aaronconnolly (https://keybase.io/aaronconnolly) on keybase.
- I have a public key ASAXmxs_SZiDcz92qU0BJveaP0BaCJ6Sv7B12qvMbtPf8go
To claim this, I am signing this object:
//: Playground - noun: a place where people can play | |
import Foundation | |
/* | |
Avoid using built-in functions to solve this challenge. Implement them yourself. | |
Implement a function that takes two strings, s and x, as arguments and finds the first occurrence of the string x in s. The function should return an integer indicating the index in s of the first occurrence of x. If there are no occurrences of x in s, return -1. | |
Example |
//: Playground - noun: a place where people can play | |
import Foundation | |
func stringPermutations(s: String) -> [String] { | |
return ["?"] | |
} | |
/* | |
Avoid using C++'s std::next_permutation or similar features in other languages to solve this challenge. Implement the algorithm yourself, since this is what you would be asked to do during a real interview. |
//: Playground - noun: a place where people can play | |
import UIKit | |
extension Array where Element: Comparable { | |
mutating func quickSort() -> Array<Element> { | |
// Recursive function that works out where our next pivots will be. | |
func qSort(start startIndex: Int, _ pivot: Int) { | |
if (startIndex < pivot) { |
import Foundation | |
/* | |
Peer-to-Peer white boarding application: | |
https://medium.com/bpxl-craft/building-a-peer-to-peer-whiteboarding-app-for-ipad-2a4c7728863e | |
Conflict-Free Replicated Data Type | |
CRDT |
//: Playground - noun: a place where people can play | |
import Foundation | |
func fizzable(_ num: Int) -> Bool { | |
return num % 3 == 0 | |
} | |
func buzzable(_ num: Int) -> Bool { | |
return num % 5 == 0 |
import Foundation | |
/* | |
Bit manipulation in Swift | |
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html | |
*/ | |
var zero: UInt8 = 0b00000000 | |
var one: UInt8 = 0b00000001 |
extension String { | |
// Subscript with an integer that returns the character | |
subscript(index: Int) -> Character { | |
return self[String.Index(encodedOffset: index)] | |
} | |
/* | |
Levenshtein Distance | |
https://en.wikipedia.org/wiki/Levenshtein_distance |
// This doesn't consider multi-code Unicode characters like 🤖 | |
extension String { | |
subscript(range: Range<Int>) -> String { | |
// Convert Int range to String.Index-based range | |
let begin = String.Index(encodedOffset: range.lowerBound) | |
let end = String.Index(encodedOffset: range.upperBound) | |
return String(self[begin...end]) | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
consumer-frontend
is a Gluestick project built using gluestick-cli
�—a thin wrapper application for helping you build and manage Gluestick projects. gluestick
is a package that is part of the gluestick-cli
monorepo. The gluestick-cli
is available on npm
and is comprised of several modules or "packages."
Gluestick
is a monorepo. It is published to npm with Learna
and contains depdent modules or "packages" for building Gluestick apps. The Gluestick repo uses Lerna 1,2 to help break what would otherwise be a potentially large code base in to smaller, versioned packages.gluestick-cli
- A package in the Gluestick monorepo that acts as a thin wrapper for managing Gluestick apps from the command-line. With it you can create an app, destroy it,