Skip to content

Instantly share code, notes, and snippets.

@doodzik
doodzik / secretary_bromskloss.py
Created November 3, 2017 17:44 — forked from anonymous/secretary_bromskloss.py
Secretary (Bromskloss)
#!/usr/bin/env python3
# coding: utf-8
from math import e
from random import shuffle
from itertools import islice
def secretary_search(candidates):
"""Rejects first n / e candidates and then selects the first