Skip to content

Instantly share code, notes, and snippets.

🤔
I am thinking

Francesco Giordano francescogior

Block or report user

Report or block francescogior

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
View Secretary-Problem.md

Secretary Problem

Riddle

A manager wants to hire $1$ secretary among $N$ candidates with the following rules:

  • He interviews each candidate in a given order
  • Each candidate after the interview is either irrevocably rejected or hired (thus preventing the necessity to interview the next candidates)

He decides to use the following method:

View sample.coffee
Whiteboard = require '../whiteboard/controller'
module.exports = (io) ->
io.on 'connection', (socket) ->
socket.on 'get socket', (whiteboardId) ->
socket.join whiteboardId
You can’t perform that action at this time.