Skip to content

Instantly share code, notes, and snippets.

@dmarcosl
dmarcosl / haruhi.py
Last active February 27, 2019 10:31
My solution to the "Haruhi Problem" http://mathsci.wikia.com/wiki/The_Haruhi_Problem
"""
You have an n episode TV series. You want to watch the episodes in every order possible.
What is the least number of episodes that you would have to watch?
Overlapping is not allowed. For example, in the case of n=2, watching episode 1, then 2, then 1 again,
would not fit the criteria.
The orders must be continuous. For example, (1,3,2) does NOT contain the sequence (1,2,3)
"""
@dmarcosl
dmarcosl / Angular FireStore zip download
Last active December 12, 2023 03:02
Download several files from Firebase Storage through an Angular8 application in zip format
// dependencies
// angular 8
// "firebase": "^7.6.1",
// "file-saver": "^2.0.2",
// "jszip": "^3.2.2"