Math ∪ Code

by Sahand Saba

  • Blog
  • GitHub
  • About
  1. Combinatorial Generation For Coding Interviews With Examples In Python

    Nov 04, 2018
    , by Sahand Saba

    What you need to know to solve basic combinatorial generation problems you might encounter on coding interviews, with plenty of examples in Python.

    Tags:
    • algorithms
    • interview-questions
    • problem-solving
    • python
    • combinatorics
  2. From An Iterator of Iterators to Cantor's Paradise: A Deep Dive Into An Interview Question

    Aug 22, 2018
    , by Sahand Saba

    A deep dive into flattening an iterator of iterators and a segue into set theory and some of its theorems based on the solutions to this problem, inspired by a coding interview question.

    Tags:
    • algorithms
    • interview-questions
    • problem-solving
    • python
    • set-theory
    • math
  3. Generating All Balanced Parentheses: A Deep Dive Into An Interview Question

    Jul 23, 2018
    , by Sahand Saba

    A deep dive into the generation of balanced parentheses, inspired by a coding interview question.

    Tags:
    • algorithms
    • interview-questions
    • problem-solving
    • python
    • combinatorics
  4. Hundred Prisonors and a Room With a Light Switch

    Aug 12, 2013
    , by Sahand Saba

    A hundred prisoners are given a challenge that might set them free. See if you can solve the puzzle involving a light switch and help them gain their freedom.

    Tags:
    • problem-solving
    • interview-questions
    • probability
    • math
    • randomized-algorithms
  5. Interview Question: All Possible Products of a List of Primes

    Aug 03, 2013
    , by Sahand Saba

    Interview question to list all possible products of a list of primes, with two Python solutions and a short discussion of the problem.

    Tags:
    • interview-questions
    • problem-solving
    • math
  6. Interview Question: Fair and Unfair Coins and Bayes' Theorem

    Jul 26, 2013
    , by Sahand Saba

    Interview question to infer the probability of an fair and unfair coins after a certain number of coin tosses using Bayes' theorem.

    Tags:
    • math
    • probability
    • problem-solving
    • interview-questions
  7. Interview Question: Fairness from Unfairness and Randomness Extraction

    Jul 11, 2013
    , by Sahand Saba

    Interview question to use an unfair coin to simulate a fair one. The question is the same as extracting randomness from an unfair Bernoulli process. A Python implementation is given.

    Tags:
    • algorithms
    • math
    • problem-solving
    • probability
    • interview-questions
    • randomized-algorithms
  8. Interview Question: Grouping Words Into Anagrams

    Jan 16, 2013
    , by Sahand Saba

    Simple Python solution to interview question to group words into anagrams.

    Tags:
    • algorithms
    • interview-questions
    • problem-solving
Copyright © 2023 Sahand Saba