Skip to content

Instantly share code, notes, and snippets.

citykid thulka

  • Vienna
Block or report user

Report or block thulka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thulka
thulka / puddles.py
Last active Dec 28, 2015
Michael Kozakov blogged about a twitter interview question
View puddles.py
# twitter interview question: http://qandwhat.apps.runkite.com/i-failed-a-twitter-interview/
#
# single pass
# recursive
#
# for debug and understanding, the function acc(umulate) returns the array of water levels in each bin.
def acc(land, i=0, leftmax=0):
leftmax = max(leftmax, land[i])
@thulka
thulka / jasmine.matcher.ts
Last active May 23, 2017
jasmine matcher in typescript - example. This one does the same as toEqual does on arrays.
View jasmine.matcher.ts
module jasmine {
interface Matchers {
toHaveSameSequence(expected: any[]): boolean;
}
}
beforeEach(function () {
this.addMatchers(
{
toHaveSameSequence: function(expected: any[]) {
You can’t perform that action at this time.